int is_offline() const { return state & ST_OFFLINE; }
int is_labeled() const { return state & ST_LABEL; }
int is_mounted() const { return state & ST_MOUNTED; }
+ int is_unmountable() const { return (is_dvd() || (is_file() && is_removable())); }
int is_part_spooled() const { return state & ST_PART_SPOOLED; }
int have_media() const { return state & ST_MEDIA; }
int is_short_block() const { return state & ST_SHORT; }
"If this is not a blank tape, try unmounting and remounting the Volume.\n"),
dev->print_name());
}
- } else if (dev->is_dvd()) {
+ } else if (dev->is_unmountable()) {
if (dev->mount(1)) {
bnet_fsend(dir, _("3002 Device %s is mounted.\n"),
dev->print_name());
if (!dev->is_busy()) {
unload_autochanger(dcr, -1);
}
- if (dev->is_dvd()) {
+ if (dev->is_unmountable()) {
if (dev->unmount(0)) {
bnet_fsend(dir, _("3002 Device %s unmounted.\n"),
dev->print_name());
/* ***FIXME**** what is this ???? */
dev->close();
}
- if (dev->is_dvd() && !dev->unmount(0)) {
+ if (dev->is_unmountable() && !dev->unmount(0)) {
bnet_fsend(dir, _("3907 %s"), dev->bstrerror());
} else {
dev->set_blocked(BST_UNMOUNTED_WAITING_FOR_SYSOP);
if (!unload_autochanger(dcr, -1)) {
dev->close();
}
- if (dev->is_dvd() && !dev->unmount(0)) {
+ if (dev->is_unmountable() && !dev->unmount(0)) {
bnet_fsend(dir, _("3907 %s"), dev->bstrerror());
} else {
bnet_fsend(dir, _("3002 Device %s unmounted.\n"),
#undef VERSION
#define VERSION "2.1.27"
-#define BDATE "14 July 2007"
-#define LSMDATE "14Jul07"
+#define BDATE "16 July 2007"
+#define LSMDATE "16Jul07"
#define PROG_COPYRIGHT "Copyright (C) %d-2007 Free Software Foundation Europe e.V.\n"
#define BYEAR "2007" /* year for copyright messages in progs */
General:
16Jul07
+kes Add ability to mount and unmount a file device providing it is
+ marked as being removable and has the appropriate mount and unmount
+ commands defined in the Device resource. This fixes bug #830.
kes When applying a storage override, release all previous storage
definitions rather than just prepending the new storage.
This should prevent a good deal of confusion.