commit 0b436d38cd9cdc3e4db649b8fd836dc84e4c0f9e Author: Igor Pashev 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 #include #include -#include #ifdef i386 #include #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)) {