소스 검색

UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n

In order to have a way of distinguishing an invalid ioctl from a
not supported (but otherwise valid) ioctl, this commit changes the
return value of the ioctl stubs from ENOTTY to ENOSYS.

This will be useful to report more accurate error messages from
userspace tools.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Ezequiel Garcia 11 년 전
부모
커밋
80744cc922
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      drivers/mtd/ubi/ubi.h

+ 2 - 2
drivers/mtd/ubi/ubi.h

@@ -875,11 +875,11 @@ static inline int ubiblock_init(void) { return 0; }
 static inline void ubiblock_exit(void) {}
 static inline int ubiblock_create(struct ubi_volume_info *vi)
 {
-	return -ENOTTY;
+	return -ENOSYS;
 }
 static inline int ubiblock_remove(struct ubi_volume_info *vi)
 {
-	return -ENOTTY;
+	return -ENOSYS;
 }
 #endif