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) InAFS(char *apath)
{ {
struct ViceIoctl blob; struct ViceIoctl blob;
cm_ioctlQueryOptions_t options;
cm_fid_t fid;
afs_int32 code; afs_int32 code;
blob.in_size = 0; memset(&options, 0, sizeof(options));
blob.out_size = MAXSIZE; options.size = sizeof(options);
blob.out = space; 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 (code) {
if ((errno == EINVAL) || (errno == ENOENT)) if ((errno == EINVAL) || (errno == ENOENT))
return 0; return 0;