Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/lfs_cleanerd Enable lfs64 in the cleaner.



details:   https://anonhg.NetBSD.org/src/rev/3ca04aa08f75
branches:  trunk
changeset: 341032:3ca04aa08f75
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Oct 15 06:25:04 2015 +0000

description:
Enable lfs64 in the cleaner.

diffstat:

 libexec/lfs_cleanerd/lfs_cleanerd.c |  23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r f36edfc1cc87 -r 3ca04aa08f75 libexec/lfs_cleanerd/lfs_cleanerd.c
--- a/libexec/lfs_cleanerd/lfs_cleanerd.c       Thu Oct 15 06:24:55 2015 +0000
+++ b/libexec/lfs_cleanerd/lfs_cleanerd.c       Thu Oct 15 06:25:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.54 2015/10/03 08:28:30 dholland Exp $    */
+/* $NetBSD: lfs_cleanerd.c,v 1.55 2015/10/15 06:25:04 dholland Exp $    */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -264,12 +264,27 @@
        free(sbuf);
 
        /* If it is not LFS, complain and exit! */
-       if (fs->lfs_dlfs_u.u_32.dlfs_magic != LFS_MAGIC) {
+       switch (fs->lfs_dlfs_u.u_32.dlfs_magic) {
+           case LFS_MAGIC:
+               fs->lfs_is64 = false;
+               fs->lfs_dobyteswap = false;
+               break;
+           case LFS_MAGIC_SWAPPED:
+               fs->lfs_is64 = false;
+               fs->lfs_dobyteswap = true;
+               break;
+           case LFS64_MAGIC:
+               fs->lfs_is64 = true;
+               fs->lfs_dobyteswap = false;
+               break;
+           case LFS64_MAGIC_SWAPPED:
+               fs->lfs_is64 = true;
+               fs->lfs_dobyteswap = true;
+               break;
+           default:
                syslog(LOG_ERR, "%s: not LFS", fsname);
                return -1;
        }
-       fs->lfs_is64 = 0; /* XXX notyet */
-       fs->lfs_dobyteswap = 0; /* XXX notyet */
        /* XXX: can this ever need to be set? does the cleaner even care? */
        fs->lfs_hasolddirfmt = 0;
 



Home | Main Index | Thread Index | Old Index