1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
commit 0b436d38cd9cdc3e4db649b8fd836dc84e4c0f9e
Author: Igor Pashev <pashev.igor@gmail.com>
Date: Sat Dec 29 13:36:54 2012 +0400
Revert "923 bootadm tries to rebuild archives which it shouldn't"
This reverts commit 6debd3f5159c9e489474b719498ab00cd81fd232.
diff --git a/usr/src/cmd/boot/bootadm/Makefile b/usr/src/cmd/boot/bootadm/Makefile
index e3f6793..31e9997 100644
--- a/usr/src/cmd/boot/bootadm/Makefile
+++ b/usr/src/cmd/boot/bootadm/Makefile
@@ -22,8 +22,6 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
-#
PROG= bootadm
@@ -38,7 +36,7 @@ include ../Makefile.com
.KEEP_STATE:
LDLIBS_i386= -lfdisk
-LDLIBS += -lnvpair -lgen -ladm -lefi -lscf -lz -lbe -lzfs $(LDLIBS_$(MACH))
+LDLIBS += -lnvpair -lgen -ladm -lefi -lscf -lz $(LDLIBS_$(MACH))
# Writing into string literals is incorrect. We need to match gcc's
# behavior, which causes us to take SIGSEGV on such a write.
diff --git a/usr/src/cmd/boot/bootadm/bootadm.c b/usr/src/cmd/boot/bootadm/bootadm.c
index 964f9b7..bdbc099 100644
--- a/usr/src/cmd/boot/bootadm/bootadm.c
+++ b/usr/src/cmd/boot/bootadm/bootadm.c
@@ -24,10 +24,6 @@
*/
/*
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
- */
-
-/*
* bootadm(1M) is a new utility for managing bootability of
* Solaris *Newboot* environments. It has two primary tasks:
* - Allow end users to manage bootability of Newboot Solaris instances
@@ -67,7 +63,6 @@
#include <zlib.h>
#include <sys/lockfs.h>
#include <sys/filio.h>
-#include <libbe.h>
#ifdef i386
#include <libfdisk.h>
#endif
@@ -2926,57 +2921,6 @@ check_archive(char *dest)
return (BAM_SUCCESS);
}
-static boolean_t
-is_be(char *root)
-{
- zfs_handle_t *zhp;
- libzfs_handle_t *hdl;
- be_node_list_t *be_nodes = NULL;
- be_node_list_t *cur_be;
- boolean_t be_exist = B_FALSE;
- char ds_path[ZFS_MAXNAMELEN];
-
- if (!is_zfs(root))
- return (B_FALSE);
- /*
- * Get dataset for mountpoint
- */
- if ((hdl = libzfs_init()) == NULL)
- return (B_FALSE);
-
- if ((zhp = zfs_path_to_zhandle(hdl, root,
- ZFS_TYPE_FILESYSTEM)) == NULL) {
- libzfs_fini(hdl);
- return (B_FALSE);
- }
-
- (void) strlcpy(ds_path, zfs_get_name(zhp), sizeof (ds_path));
-
- /*
- * Check if the current dataset is BE
- */
- if (be_list(NULL, &be_nodes) == BE_SUCCESS) {
- for (cur_be = be_nodes; cur_be != NULL;
- cur_be = cur_be->be_next_node) {
-
- /*
- * Because we guarantee that cur_be->be_root_ds
- * is null-terminated by internal data structure,
- * we can safely use strcmp()
- */
- if (strcmp(ds_path, cur_be->be_root_ds) == 0) {
- be_exist = B_TRUE;
- break;
- }
- }
- be_free_list(be_nodes);
- }
- zfs_close(zhp);
- libzfs_fini(hdl);
-
- return (be_exist);
-}
-
/*
* Returns 1 if mkiso is in the expected PATH, 0 otherwise
*/
@@ -3645,11 +3589,6 @@ update_archive(char *root, char *opt)
(void) umask(022);
/*
- * Never update non-BE root in update_all
- */
- if (!is_be(root) && bam_update_all)
- return (BAM_SUCCESS);
- /*
* root must belong to a boot archive based OS,
*/
if (!is_boot_archive(root)) {
|