Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/libntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12434/libntfs
Modified Files:
attrib.c device.c mft.c volume.c win32_io.c
Log Message:
Replaced all occurances of ENOTSUP to EOPNOTSUPP to be in better harmony
with the kernel driver
Index: attrib.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/attrib.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -p -r1.169 -r1.170
--- attrib.c 1 Aug 2005 13:40:51 -0000 1.169
+++ attrib.c 1 Aug 2005 22:10:38 -0000 1.170
@@ -85,7 +85,7 @@ s64 ntfs_get_attribute_value(const ntfs_
if (a->flags) {
Dputs("Encountered non-zero attribute flags. Cannot handle "
"this yet.");
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return 0;
}
if (!a->non_resident) {
@@ -920,7 +920,7 @@ s64 ntfs_attr_pwrite(ntfs_attr *na, cons
// TODO: Implement writing compressed attributes! (AIA)
// return ntfs_attr_pwrite_compressed(ntfs_attr *na,
// const s64 pos, s64 count, void *b);
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
if (!count)
@@ -1292,7 +1292,7 @@ rl_err_out:
goto done;
// TODO: Need to try to change initialized_size. If it
// succeeds goto done, otherwise goto err_out. (AIA)
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
goto err_out;
}
goto done;
@@ -3810,11 +3810,11 @@ put_err_out:
*
* Return 0 on success and -1 on error with errno set to the error code. The
* following error codes are defined:
- * EINVAL - Invalid arguments passed.
- * EPERM - The attribute is not allowed to be resident.
- * EIO - I/O error, damaged inode or bug.
- * ENOSPC - There is no enough space to perform conversion.
- * ENOTSUP - Requested conversion is not supported yet.
+ * EINVAL - Invalid arguments passed.
+ * EPERM - The attribute is not allowed to be resident.
+ * EIO - I/O error, damaged inode or bug.
+ * ENOSPC - There is no enough space to perform conversion.
+ * EOPNOTSUPP - Requested conversion is not supported yet.
*
* Warning: We do not set the inode dirty and we do not write out anything!
* We expect the caller to do this as this is a fairly low level
@@ -3870,7 +3870,7 @@ static int ntfs_attr_make_resident(ntfs_
Dprintf("%s(): Making compressed or encrypted files "
"resident is not implemented yet.\n",
__FUNCTION__);
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
@@ -4812,8 +4812,8 @@ put_err_out:
*
* On success return 0 and on error return -1 with errno set to the error code.
* The following error codes are defined:
- * EINVAL - Invalid arguments were passed to the function.
- * ENOTSUP - The desired resize is not implemented yet.
+ * EINVAL - Invalid arguments were passed to the function.
+ * EOPNOTSUPP - The desired resize is not implemented yet.
*/
int ntfs_attr_truncate(ntfs_attr *na, const s64 newsize)
{
@@ -4840,7 +4840,7 @@ int ntfs_attr_truncate(ntfs_attr *na, co
* TODO: Implement making handling of compressed attributes.
*/
if (NAttrCompressed(na)) {
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
if (NAttrNonResident(na)) {
Index: device.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/device.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- device.c 6 Jul 2005 22:47:17 -0000 1.17
+++ device.c 1 Aug 2005 22:10:39 -0000 1.18
@@ -529,7 +529,7 @@ s64 ntfs_device_size_get(struct ntfs_dev
*
* The following error codes are defined:
* EINVAL Input parameter error
- * ENOTSUP System does not support HDIO_GETGEO ioctl
+ * EOPNOTSUPP System does not support HDIO_GETGEO ioctl
* ENOTTY @dev is a file or a device not supporting HDIO_GETGEO
*/
s64 ntfs_device_partition_start_sector_get(struct ntfs_device *dev)
@@ -548,7 +548,7 @@ s64 ntfs_device_partition_start_sector_g
}
}
#else
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
#endif
return -1;
}
@@ -562,7 +562,7 @@ s64 ntfs_device_partition_start_sector_g
*
* The following error codes are defined:
* EINVAL Input parameter error
- * ENOTSUP System does not support HDIO_GETGEO ioctl
+ * EOPNOTSUPP System does not support HDIO_GETGEO ioctl
* ENOTTY @dev is a file or a device not supporting HDIO_GETGEO
*/
int ntfs_device_heads_get(struct ntfs_device *dev)
@@ -582,7 +582,7 @@ int ntfs_device_heads_get(struct ntfs_de
}
}
#else
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
#endif
return -1;
}
@@ -596,7 +596,7 @@ int ntfs_device_heads_get(struct ntfs_de
*
* The following error codes are defined:
* EINVAL Input parameter error
- * ENOTSUP System does not support HDIO_GETGEO ioctl
+ * EOPNOTSUPP System does not support HDIO_GETGEO ioctl
* ENOTTY @dev is a file or a device not supporting HDIO_GETGEO
*/
int ntfs_device_sectors_per_track_get(struct ntfs_device *dev)
@@ -616,7 +616,7 @@ int ntfs_device_sectors_per_track_get(st
}
}
#else
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
#endif
return -1;
}
Index: mft.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/mft.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- mft.c 6 Jul 2005 22:47:18 -0000 1.31
+++ mft.c 1 Aug 2005 22:10:39 -0000 1.32
@@ -667,7 +667,7 @@ static int ntfs_mft_bitmap_extend_alloca
ntfs_error(vol->sb, "Not enough space in this mft record to "
"accommodate extended mft bitmap attribute "
"extent. Cannot handle this yet.");
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
goto undo_alloc;
}
status.mp_rebuilt = 1;
@@ -989,7 +989,7 @@ static int ntfs_mft_data_extend_allocati
ntfs_error(vol->sb, "Not enough space in this mft record to "
"accommodate extended mft data attribute "
"extent. Cannot handle this yet.");
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
goto undo_alloc;
}
mp_rebuilt = TRUE;
Index: volume.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/volume.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- volume.c 29 Jul 2005 14:44:24 -0000 1.48
+++ volume.c 1 Aug 2005 22:10:39 -0000 1.49
@@ -1151,7 +1151,7 @@ ntfs_volume *ntfs_mount(const char *name
* defined as there are no device operations available in libntfs in
* this case.
*/
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return NULL;
#endif
}
@@ -1341,8 +1341,8 @@ int ntfs_check_if_mounted(const char *fi
* Return 0 if NTFS version is supported otherwise -1 with errno set.
*
* The following error codes are defined:
- * ENOTSUP Unknown NTFS version
- * EINVAL Invalid argument
+ * EOPNOTSUPP - Unknown NTFS version
+ * EINVAL - Invalid argument
*/
int ntfs_version_is_supported(ntfs_volume *vol)
{
@@ -1365,7 +1365,7 @@ int ntfs_version_is_supported(ntfs_volum
if (NTFS_V3_0(major, minor) || NTFS_V3_1(major, minor))
return 0;
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
Index: win32_io.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/libntfs/win32_io.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -p -r1.37 -r1.38
--- win32_io.c 12 Jul 2005 16:18:11 -0000 1.37
+++ win32_io.c 1 Aug 2005 22:10:40 -0000 1.38
@@ -127,7 +127,7 @@ static int ntfs_w32error_to_errno(unsign
case ERROR_NEGATIVE_SEEK:
return ESPIPE;
case ERROR_NOT_SUPPORTED:
- return ENOTSUP;
+ return EOPNOTSUPP;
case ERROR_BAD_NETPATH:
return ENOSHARE;
default:
@@ -787,7 +787,7 @@ static int ntfs_device_win32_open_partit
"volumes are not supported in "
"R/W status yet");
CloseHandle(handle);
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
fd->vol_handle = INVALID_HANDLE_VALUE;
@@ -895,7 +895,7 @@ static s64 ntfs_device_win32_seek(struct
if (fd->part_length == -1) {
Dputs("win32_seek(): Error: Position relative to end "
"of disk not implemented.");
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
abs_ofs = fd->part_length + offset;
@@ -1404,7 +1404,7 @@ static int ntfs_device_win32_ioctl(struc
*(int *)argp = (int)(fd->part_length / 512);
return 0;
}
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
#endif
#if defined(BLKGETSIZE64)
@@ -1414,7 +1414,7 @@ static int ntfs_device_win32_ioctl(struc
*(s64 *)argp = fd->part_length;
return 0;
}
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
#endif
#ifdef HDIO_GETGEO
@@ -1429,7 +1429,7 @@ static int ntfs_device_win32_ioctl(struc
#endif
default:
Dprintf("win32_ioctl(): unimplemented ioctl %d.\n", request);
- errno = ENOTSUP;
+ errno = EOPNOTSUPP;
return -1;
}
}
|