From: Jeffrey Altman Date: Fri, 25 Jan 2013 05:17:25 +0000 (-0500) Subject: Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY X-Git-Tag: openafs-stable-1_8_0pre1~1588 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=ddba1a1f06d140f5683e173db5a384ac5ac40977 Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY 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 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/user/RDRFunction.c b/src/WINNT/afsrdr/user/RDRFunction.c index 167491d..29e1928 100644 --- a/src/WINNT/afsrdr/user/RDRFunction.c +++ b/src/WINNT/afsrdr/user/RDRFunction.c @@ -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);