53 |
* In the case of success, mountpoint is stored in device information |
* In the case of success, mountpoint is stored in device information |
54 |
* structure for later use. |
* structure for later use. |
55 |
* |
* |
56 |
* @param devinfo Information structure where resulting data will be stored |
* @param devinfo Information structure where resulting data will be stored |
57 |
* @param object Identifies block special device |
* @param blockdev Identifies block special device |
58 |
* @return NULL in the case of failure otherwise mountpoint |
* @return NULL in the case of failure otherwise mountpoint |
59 |
*/ |
*/ |
60 |
char *DeviceInfo_MountPoint_sysdep(DeviceInfo_T devinfo, char *object) { |
char *DeviceInfo_MountPoint_sysdep(DeviceInfo_T devinfo, char *blockdev) { |
61 |
|
|
62 |
struct statfs usage; |
struct statfs usage; |
63 |
|
|
64 |
ASSERT(devinfo); |
ASSERT(devinfo); |
65 |
ASSERT(object); |
ASSERT(blockdev); |
66 |
|
|
67 |
if(statfs(object, &usage) != 0) { |
if(statfs(blockdev, &usage) != 0) { |
68 |
log("%s: Error getting mountpoint for device '%s' -- %s\n", |
log("%s: Error getting mountpoint for device '%s' -- %s\n", |
69 |
prog, object, STRERROR); |
prog, blockdev, STRERROR); |
70 |
return NULL; |
return NULL; |
71 |
} |
} |
72 |
|
|