Deleted Added
full compact
mps_show.c (286180) mps_show.c (289364)
1/*-
2 * Copyright (c) 2008 Yahoo!, Inc.
3 * All rights reserved.
4 * Written by: John Baldwin <jhb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Yahoo!, Inc.
3 * All rights reserved.
4 * Written by: John Baldwin <jhb@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * SUCH DAMAGE.
29 */
30
31#include <sys/cdefs.h>
32__RCSID("$FreeBSD: projects/mpsutil/usr.sbin/mpsutil/mps_show.c 286180 2015-08-02 03:52:51Z scottl $");
32__RCSID("$FreeBSD: projects/mpsutil/usr.sbin/mpsutil/mps_show.c 289364 2015-10-15 15:19:38Z bapt $");
33
34#include <sys/param.h>
35#include <sys/errno.h>
36#include <err.h>
37#include <libutil.h>
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>

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

265 return (error);
266 }
267 if (man0->Header.PageLength < sizeof(*man0) / 4) {
268 warnx("Invalid controller info");
269 close(fd);
270 free(man0);
271 return (EINVAL);
272 }
33
34#include <sys/param.h>
35#include <sys/errno.h>
36#include <err.h>
37#include <libutil.h>
38#include <stdio.h>
39#include <stdlib.h>
40#include <string.h>

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

265 return (error);
266 }
267 if (man0->Header.PageLength < sizeof(*man0) / 4) {
268 warnx("Invalid controller info");
269 close(fd);
270 free(man0);
271 return (EINVAL);
272 }
273 printf("/dev/mps%d\t%16s %16s %08x\n", unit,
273 printf("/dev/mp%s%d\t%16s %16s %08x\n",
274 is_mps ? "s": "r", unit,
274 man0->ChipName, man0->BoardName, facts->FWVersion.Word);
275 free(man0);
276 free(facts);
277 close(fd);
278 }
279 return (0);
280}
281MPS_COMMAND(show, adapters, show_adapters, "", "Show a summary of all adapters");

--- 477 unchanged lines hidden ---
275 man0->ChipName, man0->BoardName, facts->FWVersion.Word);
276 free(man0);
277 free(facts);
278 close(fd);
279 }
280 return (0);
281}
282MPS_COMMAND(show, adapters, show_adapters, "", "Show a summary of all adapters");

--- 477 unchanged lines hidden ---