From 159a5b113c1d907d2da005900174b6f0b94873b0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 14 Dec 1999 00:59:38 +0000 Subject: 1999-12-13 Roland McGrath Rewrite of a fix provided by Bill White : * fhandle.h (union diskfs_fhandle): Replaces struct diskfs_fhandle. Use a union element of char[28] to ensure size requirement. * fsys-getfile.c (diskfs_S_fsys_getfile): Update uses for new type. * file-getfh.c (diskfs_S_file_getfh): Likewise. --- libdiskfs/fhandle.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'libdiskfs/fhandle.h') diff --git a/libdiskfs/fhandle.h b/libdiskfs/fhandle.h index 9b1c7105..bd827d84 100644 --- a/libdiskfs/fhandle.h +++ b/libdiskfs/fhandle.h @@ -1,6 +1,6 @@ /* File handle type (for nfs server support) - Copyright (C) 1997 Free Software Foundation + Copyright (C) 1997,99 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -9,7 +9,7 @@ the Free Software Foundation; either version 2, or (at your option) any later version. - The GNU Hurd is distributed in the hope that it will be useful, + The GNU Hurd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -22,12 +22,15 @@ #define __FHANDLE_H__ /* Must be exactly 28 bytes long */ -struct diskfs_fhandle +union diskfs_fhandle { - int filler1; - int cache_id; - long gen; - int filler2[28 - sizeof (int) + sizeof (int) + sizeof (long)]; + unsigned char bytes[28]; + struct + { + int pad1; + int cache_id; + unsigned int gen; + } data; }; #endif /* __FHANDLE_H__ */ -- cgit v1.2.3