identify.c (253114) | identify.c (253115) |
---|---|
1/*- 2 * Copyright (C) 2012-2013 Intel Corporation 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) 2012-2013 Intel Corporation 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: head/sbin/nvmecontrol/identify.c 253114 2013-07-09 21:31:21Z jimharris $"); | 28__FBSDID("$FreeBSD: head/sbin/nvmecontrol/identify.c 253115 2013-07-09 21:31:58Z jimharris $"); |
29 30#include <sys/param.h> 31 32#include <ctype.h> 33#include <err.h> 34#include <fcntl.h> 35#include <stddef.h> 36#include <stdio.h> --- 82 unchanged lines hidden (view full) --- 119 (long long)nsdata->ncap, 120 (long long)nsdata->ncap / 1024 / 1024); 121 printf("Utilization (in LBAs): %lld (%lldM)\n", 122 (long long)nsdata->nuse, 123 (long long)nsdata->nuse / 1024 / 1024); 124 printf("Thin Provisioning: %s\n", 125 nsdata->nsfeat.thin_prov ? "Supported" : "Not Supported"); 126 printf("Number of LBA Formats: %d\n", nsdata->nlbaf+1); | 29 30#include <sys/param.h> 31 32#include <ctype.h> 33#include <err.h> 34#include <fcntl.h> 35#include <stddef.h> 36#include <stdio.h> --- 82 unchanged lines hidden (view full) --- 119 (long long)nsdata->ncap, 120 (long long)nsdata->ncap / 1024 / 1024); 121 printf("Utilization (in LBAs): %lld (%lldM)\n", 122 (long long)nsdata->nuse, 123 (long long)nsdata->nuse / 1024 / 1024); 124 printf("Thin Provisioning: %s\n", 125 nsdata->nsfeat.thin_prov ? "Supported" : "Not Supported"); 126 printf("Number of LBA Formats: %d\n", nsdata->nlbaf+1); |
127 printf("Current LBA Format: LBA Format #%d\n", | 127 printf("Current LBA Format: LBA Format #%02d\n", |
128 nsdata->flbas.format); | 128 nsdata->flbas.format); |
129 for (i = 0; i <= nsdata->nlbaf; i++) { 130 printf("LBA Format #%d:\n", i); 131 printf(" LBA Data Size: %d\n", 132 1 << nsdata->lbaf[i].lbads); 133 } | 129 for (i = 0; i <= nsdata->nlbaf; i++) 130 printf("LBA Format #%02d: Data Size: %5d Metadata Size: %5d\n", 131 i, 1 << nsdata->lbaf[i].lbads, nsdata->lbaf[i].ms); |
134} 135 136static void 137identify_usage(void) 138{ 139 fprintf(stderr, "usage:\n"); 140 fprintf(stderr, IDENTIFY_USAGE); 141 exit(1); --- 136 unchanged lines hidden --- | 132} 133 134static void 135identify_usage(void) 136{ 137 fprintf(stderr, "usage:\n"); 138 fprintf(stderr, IDENTIFY_USAGE); 139 exit(1); --- 136 unchanged lines hidden --- |