Deleted Added
sdiff udiff text old ( 26183 ) new ( 39300 )
full compact
1/*
2 * parsenfsfh.c - portable parser for NFS file handles
3 * uses all sorts of heuristics
4 *
5 * Jeffrey C. Mogul
6 * Digital Equipment Corporation
7 * Western Research Laboratory
8 */
9
10#ifndef lint
11static const char rcsid[] =
12 "@(#) $Header: parsenfsfh.c,v 1.12 96/12/10 23:25:50 leres Exp $ (LBL)";
13#endif
14
15#include <sys/types.h>
16#include <sys/time.h>
17
18#include <ctype.h>
19#include <memory.h>
20#include <stdio.h>
21#include <string.h>
22
23#include "interface.h"
24#include "nfsfh.h"
25
26/*
27 * This routine attempts to parse a file handle (in network byte order),

--- 280 unchanged lines hidden (view full) ---

308 *osnamep = "Ultrix";
309 break;
310
311 case FHT_VMSUCX:
312 /* No numeric file system ID, so hash on the device-name */
313 if (sizeof(*fsidp) >= 14) {
314 if (sizeof(*fsidp) > 14)
315 memset((char *)fsidp, 0, sizeof(*fsidp));
316 memcpy((char *)fsidp, fh, 14); /* just use the whole thing */
317 }
318 else {
319 u_int32_t tempa[4]; /* at least 16 bytes, maybe more */
320
321 memset((char *)tempa, 0, sizeof(tempa));
322 memcpy((char *)tempa, fh, 14); /* ensure alignment */
323 fsidp->Fsid_dev.Minor = tempa[0] + (tempa[1]<<1);
324 fsidp->Fsid_dev.Major = tempa[2] + (tempa[3]<<1);
325 fsidp->fsid_code = 0;
326 }
327
328 /* VMS file ID is: (RVN, FidHi, FidLo) */
329 *inop = make_uint32(fhp[26], fhp[27], fhp[23], fhp[22]);
330

--- 91 unchanged lines hidden ---