| 1345 | #if defined(HAVE_GETMNTENT) && !defined(SOLARIS) |
| 1346 | #define GET_MOUNTS |
| 1347 | bool Mnt::get() |
| 1348 | { |
| 1349 | /************************************** |
| 1350 | * |
| 1351 | * g e t _ m o u n t s ( S Y S T E M _ V ) |
| 1352 | * ( E P S O N ) |
| 1353 | * ( M 8 8 K ) |
| 1354 | * ( U N I X W A R E ) |
| 1355 | * |
| 1356 | ************************************** |
| 1357 | * |
| 1358 | * Functional description |
| 1359 | * Get ALL mount points. |
| 1360 | * |
| 1361 | **************************************/ |
| 1362 | fb_assert(mtab); |
| 1363 | |
| 1364 | #if defined(GETMNTENT_TAKES_TWO_ARGUMENTS) // SYSV stylish |
| 1365 | struct mnttab mnttab, *mptr = &mnttab; |
| 1366 | if (getmntent(mtab, mptr) != 0) |
| 1367 | return false; |
| 1368 | |
| 1369 | mount = mptr->mnt_mountp; |
| 1370 | type = mptr->mnt_fstype; |
| 1371 | special = mptr->mnt_special; |
| 1372 | #else // !GETMNTENT_TAKES_TWO_ARGUMENTS |
| 1373 | struct mntent* mptr = getmntent(mtab); |
| 1374 | if (!mptr) |
| 1375 | return false; |
| 1376 | |
| 1377 | mount = mptr->mnt_dir; |
| 1378 | type = mptr->mnt_type; |
| 1379 | special = mptr->mnt_fsname; |
| 1380 | #endif |
| 1381 | |
| 1382 | return true; |
| 1383 | } |
| 1384 | #endif // HAVE_GETMNTENT && !SOLARIS |
| 1385 | |
| 1386 |
no outgoing calls
no test coverage detected