Deleted Added
full compact
commands.c (302408) commands.c (328889)
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/11/sys/boot/common/commands.c 300156 2016-05-18 15:57:13Z imp $");
28__FBSDID("$FreeBSD: stable/11/sys/boot/common/commands.c 328889 2018-02-05 17:01:18Z kevans $");
29
30#include <stand.h>
31#include <string.h>
32
33#include "bootstrap.h"
34
35char *command_errmsg;
36char command_errbuf[256]; /* XXX should have procedural interface for setting, size limit? */

--- 449 unchanged lines hidden (view full) ---

486 }
487 }
488 argv += (optind);
489 argc -= (optind);
490
491 pager_open();
492 for (i = 0; devsw[i] != NULL; i++) {
493 if (devsw[i]->dv_print != NULL){
29
30#include <stand.h>
31#include <string.h>
32
33#include "bootstrap.h"
34
35char *command_errmsg;
36char command_errbuf[256]; /* XXX should have procedural interface for setting, size limit? */

--- 449 unchanged lines hidden (view full) ---

486 }
487 }
488 argv += (optind);
489 argc -= (optind);
490
491 pager_open();
492 for (i = 0; devsw[i] != NULL; i++) {
493 if (devsw[i]->dv_print != NULL){
494 sprintf(line, "%s devices:\n", devsw[i]->dv_name);
495 if (pager_output(line))
496 break;
497 devsw[i]->dv_print(verbose);
494 if (devsw[i]->dv_print(verbose))
495 break;
498 } else {
499 sprintf(line, "%s: (unknown)\n", devsw[i]->dv_name);
500 if (pager_output(line))
501 break;
502 }
503 }
504 pager_close();
505 return(CMD_OK);
506}
507
496 } else {
497 sprintf(line, "%s: (unknown)\n", devsw[i]->dv_name);
498 if (pager_output(line))
499 break;
500 }
501 }
502 pager_close();
503 return(CMD_OK);
504}
505