Functions | |
PVOLUME | new_Volume (const char *udi, const char *base, const char *prefix) |
Generate new Volume Object. | |
int | mntd_volume_init (PVOLUME pv) |
Constructor. | |
void | mntd_volume_destroy (PVOLUME pv) |
Destructor. | |
void | mntd_volume_to_string (PVOLUME pv) |
Show Device Info. | |
int | mntd_volume_set_device (PVOLUME pv, const char *device) |
Set device name. | |
char * | mntd_volume_get_device (PVOLUME pv) |
Get device name. | |
int | mntd_volume_set_mntpnt (PVOLUME pv, const char *mntpnt) |
Set device mount point. | |
char * | mntd_volume_get_mntpnt (PVOLUME pv) |
Get device mount point. | |
int | mntd_volume_set_fstype (PVOLUME pv, const char *fstype) |
Set device mount point. | |
char * | mntd_volume_get_fstype (PVOLUME pv) |
Get device filesystem name. | |
int | mntd_volume_mount (PVOLUME pv) |
Mount device. | |
int | mntd_volume_umount (PVOLUME pv) |
Unmount device. | |
int | mntd_volume_remount (PVOLUME pv, int flag) |
Remount specific mount point rd/rw. | |
char * | mntd_volume_g_build_mntpnt (PVOLUME pv, const char *base, const char *prefix) |
Helper: Build mount point path. | |
int | mntd_volume_helper_base_is_in_mntpath (const char *base, const char *mntpnt) |
Check, if base is part of mntpnt. | |
int | mntd_volume_is_in_mntpath (PVOLUME pv) |
Check, if volume is in mount path. | |
int | mntd_volume_send_mounted (PVOLUME pv) |
Send mounted signal to processes listing to dbus. | |
int | mntd_volume_send_unmounted (PVOLUME pv) |
Send unmounted signal to processes listing to dbus. | |
int | mntd_volume_send_signal (PVOLUME pv, int what) |
Send signal to processes listing to dbus. |
|
Destructor.
Definition at line 189 of file mntd_volume.c. References VOLUME_::base, MNTDDATA_::configdata, VOLUME_::device, VOLUME_::fstype, VOLUME_::mntpnt, VOLUME_::prefix, VOLUME_::remount, VOLUME_::udi, VOLUME_::umount, and ConfigData::umount_on_exit. |
|
Get device name. String within device name will be copied (with strdup), so you have to free it.
Definition at line 331 of file mntd_volume.c. |
|
Get device filesystem name. String within filesystem name will be copied (with strdup), so you have to free it.
Definition at line 481 of file mntd_volume.c. |
|
Get device mount point. String within mount point will be copied (with strdup), so you have to free it.
Definition at line 412 of file mntd_volume.c. |
|
Mount device.
Definition at line 499 of file mntd_volume.c. References VOLUME_::_send_signal, mntd_mount_mount(), mntd_volume_g_build_mntpnt(), MSG_ERR, MSG_INF, sb_dir_is_dir(), sb_dir_mkdirs(), sb_dir_remove(), sb_dir_rmdirs(), and VOLUME_::set_mntpnt. |
|
Remount specific mount point rd/rw.
Definition at line 657 of file mntd_volume.c. References mntd_mount_remount_rd(), and mntd_mount_remount_rw(). |
|
Set device name.
Definition at line 278 of file mntd_volume.c. References VOLUME_::device, VOLUME_::mount, and MSG_DEBUG. |
|
Set device mount point.
Definition at line 431 of file mntd_volume.c. References VOLUME_::fstype. |
|
Set device mount point.
Definition at line 350 of file mntd_volume.c. References VOLUME_::_send_signal, VOLUME_::mntpnt, and MSG_DEBUG. |
|
Show Device Info.
Definition at line 255 of file mntd_volume.c. References MSG_DEBUG. |
|
Unmount device. Unmount device, if it is mounted by mntd, or if it's mounted in the path mntd is responsible for. So be careful, what you mount manually and don't want to be unmounted by mntd. Default is "/mnt/mntd" path, so your normal devices on "/mnt" will not be touched.
Definition at line 587 of file mntd_volume.c. References VOLUME_::_send_signal, VOLUME_::get_mntpnt, mntd_mount_umount(), MSG_ERR, MSG_INF, sb_dir_remove(), VOLUME_::set_fstype, and VOLUME_::set_mntpnt. |
|
Generate new Volume Object.
Definition at line 86 of file mntd_volume.c. References VOLUME_::_send_mounted, VOLUME_::_send_signal, VOLUME_::_send_unmounted, VOLUME_::base, VOLUME_::destroy, VOLUME_::get_device, VOLUME_::get_fstype, VOLUME_::get_mntpnt, VOLUME_::init, VOLUME_::is_in_mntpath, VOLUME_::mount, VOLUME_::prefix, VOLUME_::remount, VOLUME_::set_device, VOLUME_::set_fstype, VOLUME_::set_mntpnt, VOLUME_::to_string, VOLUME_::udi, and VOLUME_::umount. Referenced by mntd_volume_manager_add_volume(). |