1
/* $Id: mount.c 61 2006-05-19 18:32:14Z steve-beattie $ */
4
* Copyright (C) 2002-2005 Novell/SUSE
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License as
8
* published by the Free Software Foundation, version 2 of the
15
#include <sys/types.h>
17
#include <sys/mount.h>
20
int main(int argc, char *argv[])
23
fprintf(stderr, "usage: %s [mount|umount] loopdev mountpoint\n",
28
if (strcmp(argv[1], "mount") == 0) {
29
if (mount(argv[2], argv[3], "ext2", 0xc0ed0000 | MS_MANDLOCK, NULL ) == -1) {
30
fprintf(stderr, "FAIL: mount %s on %s failed - %s\n",
35
} else if (strcmp(argv[1], "umount") == 0) {
36
if (umount(argv[3]) == -1) {
37
fprintf(stderr, "FAIL: umount %s failed - %s\n",
43
fprintf(stderr, "usage: %s [mount|umount] loopdev mountpoint\n",