fix regression from commit: "extend error codes (from samba)"
authorAmandeep Gautam <amandeep@cohesity.com>
Sun, 5 Apr 2020 22:38:49 +0000 (15:38 -0700)
committerAmandeep Gautam <amandeep@cohesity.com>
Sun, 5 Apr 2020 22:40:18 +0000 (15:40 -0700)
lib/errors.c

index afc88d1a58f1774cd4099f44db6eb0a3d6969205..207a16a105b13071ac14c0e0b20a59aa5c768c5f 100644 (file)
@@ -1046,6 +1046,7 @@ const char *nterror_to_str(uint32_t status) {
 int nterror_to_errno(uint32_t status) {
         switch (status) {
         case SMB2_STATUS_SUCCESS:
+        case SMB2_STATUS_END_OF_FILE:
                 return 0;
         case SMB2_STATUS_PENDING:
                 return EAGAIN;
@@ -1126,7 +1127,6 @@ int nterror_to_errno(uint32_t status) {
                 return EROFS;
         case SMB2_STATUS_NO_MEDIA_IN_DEVICE:
                 return ENODEV;
-        case SMB2_STATUS_END_OF_FILE:
         case SMB2_STATUS_DATA_ERROR:
         case SMB2_STATUS_CRC_ERROR:
         case SMB2_STATUS_DEVICE_DATA_ERROR: