1 |
/* ls.c - command to list files and devices */ |
/* ls.c - command to list files and devices */ |
2 |
/* |
/* |
3 |
* GRUB -- GRand Unified Bootloader |
* GRUB -- GRand Unified Bootloader |
4 |
* Copyright (C) 2003 Free Software Foundation, Inc. |
* Copyright (C) 2003,2005 Free Software Foundation, Inc. |
5 |
* |
* |
6 |
* GRUB is free software; you can redistribute it and/or modify |
* GRUB is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
189 |
goto fail; |
goto fail; |
190 |
} |
} |
191 |
|
|
192 |
if (! path) |
if (! *path) |
193 |
{ |
{ |
194 |
if (grub_errno == GRUB_ERR_UNKNOWN_FS) |
if (grub_errno == GRUB_ERR_UNKNOWN_FS) |
195 |
grub_errno = GRUB_ERR_NONE; |
grub_errno = GRUB_ERR_NONE; |
228 |
} |
} |
229 |
|
|
230 |
if (argc == 0) |
if (argc == 0) |
231 |
grub_ls_list_disks (state[0].set); |
grub_ls_list_disks (state[0].set); |
232 |
else |
else |
233 |
grub_ls_list_files (args[0], state[0].set, state[2].set, |
grub_ls_list_files (args[0], state[0].set, state[2].set, |
234 |
state[1].set); |
state[1].set); |