Skip to content

Commit

Permalink
* device-src/dvdrw-device.c: dvdrw_growisofs_command,
Browse files Browse the repository at this point in the history
  dvdrw_mount_command and dvdrw_umount_command property are
  G_TYPE_STRING.
* installcheck/Amanda_Device.pl: Test parsing dvd properties.


git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@5875 a8d146d6-cc15-0410-8900-af154a0219e0
  • Loading branch information
Jean-Louis Martineau committed Sep 3, 2014
1 parent 9b1d9f7 commit 4135368
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2014-09-03 Jean-Louis Martineau <[email protected]>
* device-src/dvdrw-device.c: dvdrw_growisofs_command,
dvdrw_mount_command and dvdrw_umount_command property are
G_TYPE_STRING.
* installcheck/Amanda_Device.pl: Test parsing dvd properties.

2014-09-03 Jean-Louis Martineau <[email protected]>
* device-src/s3.c (get_openstack_swift_api_v2_setting): Set
hdl->x_auth_token to NULL.
Expand Down
6 changes: 3 additions & 3 deletions device-src/dvdrw-device.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ dvdrw_device_register(void)
"Treat unmountable volumes as unlabelled when reading label");

device_property_fill_and_register(&device_property_dvdrw_growisofs_command,
G_TYPE_BOOLEAN, "dvdrw_growisofs_command",
G_TYPE_STRING, "dvdrw_growisofs_command",
"The location of the growisofs command used to write the DVD-RW");

device_property_fill_and_register(&device_property_dvdrw_mount_command,
G_TYPE_BOOLEAN, "dvdrw_mount_command",
G_TYPE_STRING, "dvdrw_mount_command",
"The location of the mount command used to mount the DVD-RW filesystem for reading");

device_property_fill_and_register(&device_property_dvdrw_umount_command,
G_TYPE_BOOLEAN, "dvdrw_umount_command",
G_TYPE_STRING, "dvdrw_umount_command",
"The location of the umount command used to unmount the DVD-RW filesystem after reading");

register_device(dvdrw_device_factory, device_prefix_list);
Expand Down
32 changes: 31 additions & 1 deletion installcheck/Amanda_Device.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com

use Test::More tests => 616;
use Test::More tests => 623;
use File::Path qw( mkpath rmtree );
use Sys::Hostname;
use Carp;
Expand Down Expand Up @@ -747,6 +747,36 @@ sub properties_include {
"finish device after LEOM test")
or diag($dev->error_or_status());

## dvdrw device

$vtape1 = mkvtape(1);
$dev_name = "dvdrw:$vtape1:/dev/scd0";

$dev = Amanda::Device->new($dev_name);
is($dev->status(), $DEVICE_STATUS_SUCCESS,
"$dev_name: create successful")
or diag($dev->error_or_status());

properties_include([ $dev->property_list() ],
[ @common_properties, 'max_volume_usage' ],
"necessary properties listed on vfs device");

# play with properties a little bit
ok($dev->property_set("DVDRW_GROWISOFS_COMMAND", "/path/to/growisofs"),
"set DVDRW_GROWISOFS_COMMAND");

ok($dev->property_set("dvdrw_mount_command", "/path/to/mount"),
"set dvdrw_mount_command");

ok($dev->property_set("dvdrw_umount_command", "/path/to/umount"),
"set dvdrw_umount_command");

ok($dev->property_set("block_size", 32768),
"set an integer property to an integer");

ok(!($dev->property_set("invalid-property-name", 32768)),
"set an invalid-property-name");

####
## Test a RAIT device of two vfs devices.

Expand Down

0 comments on commit 4135368

Please sign in to comment.