Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 25 Jan 2013 05:17:25 +0000 (00:17 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 2 Feb 2013 17:22:39 +0000 (09:22 -0800)
Instead of stating that the AFS device is read only; report
that the volume in question is read only using the FILE_READ_ONLY_VOLUME
file system characteristic.

Change-Id: I0b172f8a984802a3cefdea84436c9ed44f34d7f1
Reviewed-on: http://gerrit.openafs.org/8975
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsrdr/user/RDRFunction.c

index 167491d..29e1928 100644 (file)
@@ -5415,7 +5415,7 @@ RDR_GetVolumeInfo( IN cm_user_t     *userp,
         memcpy(&pResultCB->VolumeCreationTime, &ft, sizeof(ft));
 
         pResultCB->AvailableAllocationUnits.QuadPart = 0;
-        pResultCB->Characteristics |= FILE_READ_ONLY_DEVICE;
+        pResultCB->FileSystemAttributes |= FILE_READ_ONLY_VOLUME;
 
         pResultCB->VolumeLabelLength = cm_Utf8ToUtf16( "Freelance.Local.Root", -1, pResultCB->VolumeLabel,
                                                        (sizeof(pResultCB->VolumeLabel) / sizeof(WCHAR)) + 1);
@@ -5431,7 +5431,8 @@ RDR_GetVolumeInfo( IN cm_user_t     *userp,
         }
         volType = cm_VolumeType(volp, scp->fid.volume);
 
-        pResultCB->Characteristics |= ((volType == ROVOL || volType == BACKVOL) ? FILE_READ_ONLY_DEVICE : 0);
+        if (volType == ROVOL || volType == BACKVOL)
+            pResultCB->FileSystemAttributes |= FILE_READ_ONLY_VOLUME;
 
         code = cm_SyncOp(scp, NULL, userp, &req, PRSFS_READ,
                          CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS);