114
112
void exec_pmount( const char* device, const char* fstype, const char* label,
115
113
dbus_bool_t sync, dbus_bool_t noatime, dbus_bool_t exec, const char*
116
umask, const char *fmask, const char *dmask, const char* iocharset, int addargc, const char* const* addargv )
114
umask, const char* iocharset, int addargc, const char* const* addargv )
118
116
const char** argv = (const char**) calloc( sizeof( const char* ), addargc+15 );
373
359
debug( "umask: %s\n", umask );
375
if( volume && libhal_device_property_exists( hal_ctx,
376
libhal_volume_get_udi( volume ), "volume.policy.mount_option.fmask", &error ) )
377
fmask = libhal_device_get_property_string( hal_ctx,
378
libhal_volume_get_udi( volume ), "volume.policy.mount_option.fmask", &error );
379
else if( libhal_device_property_exists( hal_ctx,
380
libhal_drive_get_udi( drive ), "storage.policy.mount_option.fmask", &error ) )
381
fmask = libhal_device_get_property_string( hal_ctx,
382
libhal_drive_get_udi( drive ), "storage.policy.mount_option.fmask", &error );
383
else if( libhal_device_property_exists( hal_ctx, computer_udi, "storage.policy.default.mount_option.fmask", &error ) )
384
fmask = libhal_device_get_property_string( hal_ctx, computer_udi, "storage.policy.default.mount_option.fmask", &error );
386
debug( "fmask: %s\n", fmask );
388
if( volume && libhal_device_property_exists( hal_ctx,
389
libhal_volume_get_udi( volume ), "volume.policy.mount_option.dmask", &error ) )
390
dmask = libhal_device_get_property_string( hal_ctx,
391
libhal_volume_get_udi( volume ), "volume.policy.mount_option.dmask", &error );
392
else if( libhal_device_property_exists( hal_ctx,
393
libhal_drive_get_udi( drive ), "storage.policy.mount_option.dmask", &error ) )
394
dmask = libhal_device_get_property_string( hal_ctx,
395
libhal_drive_get_udi( drive ), "storage.policy.mount_option.dmask", &error );
396
else if( libhal_device_property_exists( hal_ctx, computer_udi, "storage.policy.default.mount_option.dmask", &error ) )
397
dmask = libhal_device_get_property_string( hal_ctx, computer_udi, "storage.policy.default.mount_option.dmask", &error );
399
debug( "dmask: %s\n", dmask );
401
361
/* shut down hal connection */
402
362
libhal_ctx_shutdown( hal_ctx, &error );
403
363
libhal_ctx_free( hal_ctx );
405
365
dbus_connection_unref( dbus_conn );
408
exec_pmount( device, fstype, label, sync, noatime, exec, umask, fmask, dmask, iocharset, argc-2, argv+2 );
368
exec_pmount( device, fstype, label, sync, noatime, exec, umask, iocharset, argc-2, argv+2 );