1 #define _LARGEFILE64_SOURCE /* needed to use lseek64 */
13 #include <ros/syscall.h>
15 /* The naming for the args in bind is messy historically. We do:
16 * bind src_path onto_path
17 * plan9 says bind NEW OLD, where new is *src*, and old is *onto*.
18 * Linux says mount --bind OLD NEW, where OLD is *src* and NEW is *onto*. */
19 int main(int argc, char *argv[])
23 char *src_path, *onto_path;
24 /* crap arg handling for now. */
35 printf("-a or -b and/or -c for now\n");
42 fprintf(stderr, "usage: bind [-a|-b] src_path onto_path\n");
47 printf("bind %s -> %s flag %d\n", src_path, onto_path, flag);
48 ret = syscall(SYS_nbind, src_path, strlen(src_path), onto_path,
49 strlen(onto_path), flag);