Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libukfs Init ukfs__part_{na, none} statically instead of ...
details: https://anonhg.NetBSD.org/src/rev/55635e70beb5
branches: trunk
changeset: 749866:55635e70beb5
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Dec 11 16:47:33 2009 +0000
description:
Init ukfs__part_{na,none} statically instead of at runtime to avoid
init-order lossage from p2k/rump_smbfs, as noted by Tron.
diffstat:
lib/libukfs/ukfs.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diffs (44 lines):
diff -r e37c552b182e -r 55635e70beb5 lib/libukfs/ukfs.c
--- a/lib/libukfs/ukfs.c Fri Dec 11 16:46:27 2009 +0000
+++ b/lib/libukfs/ukfs.c Fri Dec 11 16:47:33 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ukfs.c,v 1.43 2009/12/03 14:23:49 pooka Exp $ */
+/* $NetBSD: ukfs.c,v 1.44 2009/12/11 16:47:33 pooka Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Antti Kantee. All Rights Reserved.
@@ -177,16 +177,8 @@
.part_devsize = RUMP_ETFS_SIZE_ENDOFF,
};
static struct ukfs_part ukfs__part_na;
-struct ukfs_part *ukfs_part_none;
-struct ukfs_part *ukfs_part_na;
-
-static void
-ukfs_initparts(void)
-{
-
- ukfs_part_none = &ukfs__part_none;
- ukfs_part_na = &ukfs__part_na;
-}
+struct ukfs_part *ukfs_part_none = &ukfs__part_none;
+struct ukfs_part *ukfs_part_na = &ukfs__part_na;
int
_ukfs_init(int version)
@@ -200,7 +192,6 @@
return -1;
}
- ukfs_initparts();
if ((rv = rump_init()) != 0) {
errno = rv;
return -1;
@@ -225,7 +216,6 @@
int error = 0;
int devfd = -1;
- ukfs_initparts();
if ((p = strstr(devpath, UKFS_PARTITION_SCANMAGIC)) != NULL) {
fprintf(stderr, "ukfs: %%PART is deprecated. use "
"%%DISKLABEL instead\n");
Home |
Main Index |
Thread Index |
Old Index