Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (30 sloc) 0.533 kB
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mount.h>
int main(int argc, char **argv) {
int rc;
if (argc < 2) {
exit(1);
}
if (!strcmp("mount", argv[1])) {
if (argc < 4) {
exit(1);
}
rc = mount(argv[2], argv[3], "ext2", MS_MGC_VAL, NULL);
if (rc) {
perror("");
exit(1);
}
} else if (!strcmp("umount", argv[1])) {
if (argc < 3) {
exit(1);
}
rc = umount(argv[2]);
if (rc) {
perror("");
exit(1);
}
}
exit(0);
}
Jump to Line
Something went wrong with that request. Please try again.