Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/libntfs
In directory usw-pr-cvs1:/tmp/cvs-serv12839/libntfs
Modified Files:
attrib.c volume.c
Log Message:
Updates
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/attrib.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -U2 -r1.43 -r1.44
--- attrib.c 5 Jun 2002 20:32:53 -0000 1.43
+++ attrib.c 7 Jun 2002 01:16:20 -0000 1.44
@@ -390,6 +390,5 @@
*/
static __inline__ void __ntfs_attr_init(ntfs_attr *na, ntfs_inode *ni,
- const ATTR_TYPES type, uchar_t *name,
- const __u32 name_len)
+ const ATTR_TYPES type, uchar_t *name, const __u32 name_len)
{
na->rl = NULL;
Index: volume.c
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/libntfs/volume.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -U2 -r1.43 -r1.44
--- volume.c 2 Jun 2002 23:02:20 -0000 1.43
+++ volume.c 7 Jun 2002 01:16:20 -0000 1.44
@@ -375,5 +375,5 @@
ntfs_volume *vol;
NTFS_BOOT_SECTOR *bs = NULL;
- int eo, ro = rwflag & MS_RDONLY;
+ int eo;
#ifdef DEBUG
BOOL debug = 1;
@@ -392,6 +392,8 @@
if (!(bs = (NTFS_BOOT_SECTOR *)malloc(sizeof(NTFS_BOOT_SECTOR))))
goto error_exit;
+ if (rwflag & MS_RDONLY)
+ NVolSetReadOnly(vol);
Dprintf("Reading bootsector... ");
- if ((vol->fd = open(name, ro ? O_RDONLY: O_RDWR)) == -1) {
+ if ((vol->fd = open(name, NVolReadOnly(vol) ? O_RDONLY: O_RDWR)) < 0) {
Dputs(FAILED);
Dperror("Error opening partition file");
|