windows-fs-path-in-afs-20090507

LICENSE MIT

Switch the PathInAfs test to use VIOCGETFID instead of VIOC_GET_CELL_NAME
so that the literal option can be used.
This commit is contained in:
Jeffrey Altman 2009-05-07 16:02:53 +00:00
parent 6217199058
commit fd0f1f49f2

View File

@ -246,13 +246,20 @@ static int
InAFS(char *apath)
{
struct ViceIoctl blob;
cm_ioctlQueryOptions_t options;
cm_fid_t fid;
afs_int32 code;
blob.in_size = 0;
blob.out_size = MAXSIZE;
blob.out = space;
memset(&options, 0, sizeof(options));
options.size = sizeof(options);
options.field_flags |= CM_IOCTL_QOPTS_FIELD_LITERAL;
options.literal = 1;
blob.in_size = options.size; /* no variable length data */
blob.in = &options;
blob.out_size = sizeof(cm_fid_t);
blob.out = (char *) &fid;
code = pioctl_utf8(apath, VIOC_FILE_CELL_NAME, &blob, 1);
code = pioctl_utf8(apath, VIOCGETFID, &blob, 1);
if (code) {
if ((errno == EINVAL) || (errno == ENOENT))
return 0;