# SunOS No Additional Sense
# FreeBSD Current Driver State: at rest.
# Linux ONLINE
+# Note Debian has messed up their mt. When no tape is in the
+# drive it waits 2 minutes. When a tape is in the drive, it
+# prints user unfriendly output.
+#
OS=`uname`
case ${OS} in
SunOS)
ready="No Additional Sense"
- # Sun sed/awk etc are not sufficient, working versions are in /usr/xpg4/bin
- export PATH="/usr/local/sbin:/usr/local/bin:/usr/sfw/bin:/usr/xpg4/bin:/usr/bin"
;;
FreeBSD)
ready="Current Driver State: at rest."
;;
- *)
- ready="ONLINE"
+ Linux)
+ if test -e /etc/debian_version ; then
+ ready="drive status"
+ else
+ ready="ONLINE"
+ fi
;;
esac
WIN32_FIND_DATAA info_a; // window's file info
// cache some common vars to make code more transparent
- DWORD* pdwFileAttributes;
- DWORD* pnFileSizeHigh;
- DWORD* pnFileSizeLow;
- FILETIME* pftLastAccessTime;
- FILETIME* pftLastWriteTime;
- FILETIME* pftCreationTime;
+ DWORD *pdwFileAttributes;
+ DWORD *pnFileSizeHigh;
+ DWORD *pnFileSizeLow;
+ DWORD *pdwReserved0;
+ FILETIME *pftLastAccessTime;
+ FILETIME *pftLastWriteTime;
+ FILETIME *pftCreationTime;
if (file[1] == ':' && file[2] == 0) {
Dmsg1(99, "faking ROOT attrs(%s).\n", file);
free_pool_memory(pwszBuf);
pdwFileAttributes = &info_w.dwFileAttributes;
+ pdwReserved0 = &info_w.dwReserved0;
pnFileSizeHigh = &info_w.nFileSizeHigh;
pnFileSizeLow = &info_w.nFileSizeLow;
pftLastAccessTime = &info_w.ftLastAccessTime;
h = p_FindFirstFileA(file, &info_a);
pdwFileAttributes = &info_a.dwFileAttributes;
+ pdwReserved0 = &info_a.dwReserved0;
pnFileSizeHigh = &info_a.nFileSizeHigh;
pnFileSizeLow = &info_a.nFileSizeLow;
pftLastAccessTime = &info_a.ftLastAccessTime;
/* Use st_rdev to store reparse attribute */
sb->st_rdev = (*pdwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) ? 1 : 0;
-
+ if (sb->st_rdev == 1 && *pdwReserved0 & IO_REPARSE_TAG_MOUNT_POINT) {
+ sb->st_rdev = 2; /* mount point */
+ }
sb->st_size = *pnFileSizeHigh;
sb->st_size <<= 32;
return -1;
}
- if (attr & FILE_ATTRIBUTE_DIRECTORY) {
- return statDir(tmpbuf, sb);
- }
-
h = CreateFileA(tmpbuf, GENERIC_READ,
FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
rval = fstat((int)h, sb);
CloseHandle(h);
+ if (attr & FILE_ATTRIBUTE_DIRECTORY) {
+ return statDir(tmpbuf, sb);
+ }
+
return rval;
}
sb->st_atime = cvt_ftime_to_utime(data.ftLastAccessTime);
sb->st_mtime = cvt_ftime_to_utime(data.ftLastWriteTime);
sb->st_ctime = cvt_ftime_to_utime(data.ftCreationTime);
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ return statDir(file, sb);
+ }
return 0;
}
Technical notes on version 2.3
+New features (buried):
+TLS authentication
+bextract Win32 data
+Run afterVSS
+Multiple command/console per runscript
+console command
+Bat API
+Plugin API
+State file updated on job term
+PluginOptions
+FD Version
+Duplicate Job directives
+MaxFullInterval
+MaxDiffInterval
+Honor nodump flag
+Improved status commands for Bat
+Spooling/despooling status
+Implement ftruncate for NFS devices
+
+
General:
+20Mar08
+kes Fix mtx-changer.in for broken Debian mt program.
19Mar08
kes Fix large number of JobMedia records reported by Eric Bollengier.
18Mar08