/* *************************************************************************** * Get number of mounted filesystems from /etc/mtab. Don't take into account * pseudo-filesystems. * * IN: * @a Activity structure. * * RETURNS: * Number of filesystems + a pre-allocation constant. *************************************************************************** */ __nr_t wrap_get_filesystem_nr(struct activity *a) { __nr_t n = 0; if ((n = get_filesystem_nr()) > 0) return n + NR_FILESYSTEM_PREALLOC; return 0; }
/* *************************************************************************** * Get number of mounted filesystems from /etc/mtab. Don't take into account * pseudo-filesystems. * * IN: * @a Activity structure. * * RETURNS: * Number of filesystems + a pre-allocation constant. Number cannot exceed * MAX_NR_FS. *************************************************************************** */ __nr_t wrap_get_filesystem_nr(struct activity *a) { __nr_t n = 0; if ((n = get_filesystem_nr()) > 0) { if ((n + NR_FILESYSTEM_PREALLOC) > MAX_NR_FS) return MAX_NR_FS; else return n + NR_FILESYSTEM_PREALLOC; } return 0; }