Changeset 4f100f4 in mainline for uspace/app/bdsh/cmds/modules/mount
- Timestamp:
- 2011-11-06T16:58:23Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 41047bf
- Parents:
- 3ce78580 (diff), 460514d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/app/bdsh/cmds/modules/mount/mount.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/mount/mount.c
r3ce78580 r4f100f4 30 30 #include <stdlib.h> 31 31 #include <vfs/vfs.h> 32 #include <adt/list.h> 32 33 #include <errno.h> 33 34 #include <getopt.h> … … 60 61 } 61 62 return; 63 } 64 65 static void print_mtab_list(void) 66 { 67 LIST_INITIALIZE(mtab_list); 68 get_mtab_list(&mtab_list); 69 70 mtab_ent_t *old_ent = NULL; 71 72 list_foreach(mtab_list, cur) { 73 mtab_ent_t *mtab_ent = list_get_instance(cur, mtab_ent_t, 74 link); 75 76 if (old_ent) 77 free(old_ent); 78 79 old_ent = mtab_ent; 80 81 printf("%s on %s ", mtab_ent->fs_name, mtab_ent->mp); 82 83 if (str_size(mtab_ent->opts) > 0) 84 printf("opts=%s ", mtab_ent->opts); 85 86 printf("(instance=%d, service_id=%" PRIu64 ")\n", 87 mtab_ent->instance, mtab_ent->service_id); 88 } 89 90 if (old_ent) 91 free(old_ent); 62 92 } 63 93 … … 94 124 t_argv = &argv[0]; 95 125 96 if ((argc < 3) || (argc > 5)) {126 if ((argc == 2) || (argc > 5)) { 97 127 printf("%s: invalid number of arguments. Try `mount --help'\n", 98 128 cmdname); 99 129 return CMD_FAILURE; 130 } 131 if (argc == 1) { 132 print_mtab_list(); 133 return CMD_SUCCESS; 100 134 } 101 135 if (argc > 3)
Note:
See TracChangeset
for help on using the changeset viewer.
