patch-2.3.41 linux/fs/udf/lowlevel.c
Next file: linux/fs/udf/misc.c
Previous file: linux/fs/udf/inode.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Tue Jan 25 11:19:04 2000
- Orig file:
v2.3.40/linux/fs/udf/lowlevel.c
- Orig date:
Thu Jan 6 12:57:48 2000
diff -u --recursive --new-file v2.3.40/linux/fs/udf/lowlevel.c linux/fs/udf/lowlevel.c
@@ -15,7 +15,7 @@
* ftp://prep.ai.mit.edu/pub/gnu/GPL
* Each contributing author retains all rights to their own work.
*
- * (C) 1999 Ben Fennema
+ * (C) 1999-2000 Ben Fennema
*
* HISTORY
*
@@ -47,16 +47,21 @@
vol_desc_start=0;
ms_info.addr_format=CDROM_LBA;
- i=ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long) &ms_info);
+ i = ioctl_by_bdev(bdev, CDROMMULTISESSION, (unsigned long) &ms_info);
+
#define WE_OBEY_THE_WRITTEN_STANDARDS 1
- if (i == 0) {
+
+ if (i == 0)
+ {
udf_debug("XA disk: %s, vol_desc_start=%d\n",
(ms_info.xa_flag ? "yes" : "no"), ms_info.addr.lba);
#if WE_OBEY_THE_WRITTEN_STANDARDS
if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
#endif
vol_desc_start = ms_info.addr.lba;
- } else {
+ }
+ else
+ {
udf_debug("CDROMMULTISESSION not supported: rc=%d\n", i);
}
return vol_desc_start;
@@ -86,17 +91,20 @@
lblock = 0;
ret = ioctl_by_bdev(bdev, BLKGETSIZE, (unsigned long) &lblock);
- if (!ret && lblock != 0x7FFFFFFF) {
- /* Hard Disk */
+ if (!ret && lblock != 0x7FFFFFFF) /* Hard Disk */
+ {
if (mult)
lblock *= mult;
else if (div)
lblock /= div;
- } else {
- /* CDROM */
+ }
+ else /* CDROM */
+ {
ret = ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock);
}
+
if (!ret && lblock)
return lblock - 1;
- return 0;
+ else
+ return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)