1*f3de9d7dShelg /* $OpenBSD: fuse-mount.c,v 1.2 2018/07/20 12:05:08 helg Exp $ */
23270c159Shelg /*
33270c159Shelg * Copyright (c) 2018 Helg Bredow <helg@openbsd.org>
43270c159Shelg *
53270c159Shelg * Permission to use, copy, modify, and distribute this software for any
63270c159Shelg * purpose with or without fee is hereby granted, provided that the above
73270c159Shelg * copyright notice and this permission notice appear in all copies.
83270c159Shelg *
93270c159Shelg * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
103270c159Shelg * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
113270c159Shelg * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
123270c159Shelg * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
133270c159Shelg * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
143270c159Shelg * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
153270c159Shelg * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
163270c159Shelg */
173270c159Shelg
183270c159Shelg #include <fuse.h>
193270c159Shelg
203270c159Shelg int
main(int argc,char ** argv)213270c159Shelg main(int argc, char **argv)
223270c159Shelg {
233270c159Shelg struct fuse_chan *fc;
243270c159Shelg const char *dir = "/mnt";
253270c159Shelg
263270c159Shelg fc = fuse_mount(dir, NULL);
273270c159Shelg if (fc == NULL)
283270c159Shelg return (1);
293270c159Shelg
303270c159Shelg fuse_unmount(dir, fc);
313270c159Shelg
323270c159Shelg return (0);
333270c159Shelg }
34