Deleted Added
full compact
getconf.c (302408) getconf.c (304949)
1/*
2 * Copyright 2000 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*
2 * Copyright 2000 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: stable/11/usr.bin/getconf/getconf.c 164945 2006-12-06 12:00:26Z maxim $");
31__FBSDID("$FreeBSD: stable/11/usr.bin/getconf/getconf.c 304949 2016-08-28 07:16:11Z ngie $");
32
33#include <sys/types.h>
34
35#include <err.h>
36#include <errno.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <sysexits.h>

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

104
105 return 0;
106 }
107 if ((valid = find_confstr(name, &key)) != 0) {
108 if (valid > 0)
109 do_confstr(name, key);
110 else
111 printf("undefined\n");
32
33#include <sys/types.h>
34
35#include <err.h>
36#include <errno.h>
37#include <stdio.h>
38#include <stdlib.h>
39#include <sysexits.h>

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

104
105 return 0;
106 }
107 if ((valid = find_confstr(name, &key)) != 0) {
108 if (valid > 0)
109 do_confstr(name, key);
110 else
111 printf("undefined\n");
112 } else {
112 } else {
113 valid = find_sysconf(name, &key);
114 if (valid > 0) {
115 do_sysconf(name, key);
116 } else if (valid < 0) {
117 printf("undefined\n");
113 valid = find_sysconf(name, &key);
114 if (valid > 0) {
115 do_sysconf(name, key);
116 } else if (valid < 0) {
117 printf("undefined\n");
118 } else
118 } else
119 errx(EX_USAGE,
120 "no such configuration parameter `%s'",
121 name);
122 }
123 } else {
124 valid = find_pathconf(name, &key);
125 if (valid != 0) {
126 if (valid > 0)

--- 64 unchanged lines hidden ---
119 errx(EX_USAGE,
120 "no such configuration parameter `%s'",
121 name);
122 }
123 } else {
124 valid = find_pathconf(name, &key);
125 if (valid != 0) {
126 if (valid > 0)

--- 64 unchanged lines hidden ---