added a new header file to encapsulate compiler-specific stuff.
[newos.git] / apps / unmount / main.c
blobfa91471bdbd39f4a9e20dda55c14dea0b432f138
1 /*
2 ** Copyright 2002, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #include <sys/syscalls.h>
6 #include <stdio.h>
7 #include <string.h>
9 int main(int argc, char *argv[])
11 int rc;
13 if(argc < 2) {
14 printf("not enough arguments to unmount\n");
15 return 0;
18 rc = _kern_unmount(argv[1]);
19 if (rc < 0) {
20 printf("_kern_unmount() returned error: %s\n", strerror(rc));
21 } else {
22 printf("%s successfully unmounted.\n", argv[1]);
25 return 0;