Changeset 6afc9d7 in mainline for uspace/app/df/df.c


Ignore:
Timestamp:
2015-10-06T19:01:36Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0328987
Parents:
f1f7584
Message:

UNIX-like I/O functions should use errno to return error code for many reasons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/df/df.c

    rf1f7584 r6afc9d7  
    119119
    120120        LIST_INITIALIZE(mtab_list);
    121         get_mtab_list(&mtab_list);
     121        vfs_get_mtab_list(&mtab_list);
    122122
    123123        print_header();
    124124        list_foreach(mtab_list, link, mtab_ent_t, mtab_ent) {
    125                 statfs(mtab_ent->mp, &st);
    126                 print_statfs(&st, mtab_ent->fs_name, mtab_ent->mp);
     125                if (statfs(mtab_ent->mp, &st) == 0) {
     126                        print_statfs(&st, mtab_ent->fs_name, mtab_ent->mp);
     127                } else {
     128                        fprintf(stderr, "Cannot get information for '%s' (%d).\n",
     129                            mtab_ent->mp, errno);
     130                }
    127131        }
    128132
Note: See TracChangeset for help on using the changeset viewer.