From db9c0b1e3ddf5399f7d6b730d74d52e58f260f49 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 14 Jul 1994 19:50:21 +0000 Subject: Formerly hyper.c.~6~ --- ufs/hyper.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ufs/hyper.c b/ufs/hyper.c index 7bb8d7c8..c9ffcc63 100644 --- a/ufs/hyper.c +++ b/ufs/hyper.c @@ -47,6 +47,13 @@ get_hypermetadata (void) exit (1); } + if (sblock->fs_maxsymlinklen > MAXSYMLINKLEN) + { + fprintf (stderr, "Max shortcut symlinklen %d is too big (max is %d)\n", + sblock->fs_maxsymlinklen, MAXSYMLINKLEN); + exit (1); + } + /* If this is an old filesystem, then we have some more work to do; some crucial constants might not be set; we are therefore forced to set them here. */ @@ -57,6 +64,12 @@ get_hypermetadata (void) if (sblock->fs_postblformat == FS_42POSTBLFMT) sblock->fs_nrpos = 8; + /* Find out if we support the 4.4 symlink/dirtype extension */ + if (sblock->fs_maxsymlinklen > 0) + direct_symlink_extension = 1; + else + direct_symlink_extension = 0; + err = dev_read_sync (fsbtodb (sblock->fs_csaddr), (vm_address_t *) &csum, sblock->fs_fsize * howmany (sblock->fs_cssize, sblock->fs_fsize)); -- cgit v1.2.3