]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/nandtool/usage.h
MFC r326276:
[FreeBSD/FreeBSD.git] / usr.sbin / nandtool / usage.h
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3  *
4  * Copyright (c) 2010-2012 Semihalf.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  *
28  * $FreeBSD$
29  */
30
31 #ifndef __USAGE_H
32 #define __USAGE_H
33
34 static const char nand_help_usage[] =
35         "Usage: %s help topic=<cmd>\n"
36         "\n"
37         "Arguments:\n"
38         "\tcmd\t- [help|read|write|erase|readoob|writeoob|info]\n"
39         "\n";
40
41 static const char nand_read_usage[] =
42         "Usage: %s read dev=<gnand_device> (block|page|pos)=n [count=n]\n"
43         "\n"
44         "Arguments:\n"
45         "\tdev\t- path to gnand device node\n"
46         "\tblock\t- starting block or\n"
47         "\tpage\t- starting page or\n"
48         "\tpos\t- starting position (in bytes, must be page-aligned)\n"
49         "\tout\t- output file (hexdump to stdout if not supplied)\n"
50         "\n"
51         "Note that you can only specify only one of: 'block', 'page', 'pos'\n"
52         "parameters at once. 'count' parameter is meaningful in terms of used\n"
53         "unit (page, block or byte).\n";
54
55 static const char nand_write_usage[] =
56         "Usage: %s write dev=<gnand_device> in=<file> (block|page|pos)=n [count=n]\n"
57         "\n"
58         "Arguments:\n"
59         "\tdev\t- path to gnand device node\n"
60         "\tin\t- path to input file which be writed to gnand\n"
61         "\tblock\t- starting block or\n"
62         "\tpage\t- starting page or\n"
63         "\tpos\t- starting position (in bytes, must be page-aligned)\n"
64         "\tcount\t- byte/page/block count\n"
65         "\n"
66         "";
67
68 static const char nand_erase_usage[] =
69         "Usage: %s erase dev=<gnand_device> (block|page|pos)=n [count=n]\n"
70         "\n"
71         "Arguments:\n"
72         "\tdev\t- path to gnand device node\n"
73         "\tblock\t- starting block or\n"
74         "\tpage\t- starting page or\n"
75         "\tpos\t- starting position (in bytes, muse be block-aligned)\n"
76         "\tcount\t- byte/page/block count\n"
77         "\n"
78         "NOTE: position and count for erase operation MUST be block-aligned\n";
79
80 static const char nand_read_oob_usage[] =
81         "Usage: %s readoob dev=<gnand_device> page=n [out=file] [count=n]\n"
82         "\n"
83         "Arguments:\n"
84         "\tdev\t- path to gnand device node\n"
85         "\tpage\t- page (page) number\n"
86         "\tout\t- outut file (hexdump to stdout if not supplied)\n"
87         "\tcount\t- page count (default is 1)\n"
88         "\n"
89         "If you supply count parameter with value other than 1, data will be\n"
90         "read from subsequent page's OOB areas\n";
91
92 static const char nand_write_oob_usage[] =
93         "Usage: %s writeoob dev=<gnand_device> in=<file> page=n [count=n]\n"
94         "\n"
95         "\tdev\t- path to gnand device node\n"
96         "\tin\t- path to file containing data which will be written\n"
97         "\tpage\t- page (page) number\n"
98         "\n"
99         "If you supply count parameter with value other than 1, data will be\n"
100         "written to subsequent page's OOB areas\n";
101
102 static const char nand_info_usage[] =
103         "Usage: %s info dev=<gnand_device>\n"
104         "\n"
105         "Arguments:\n"
106         "\tdev\t- path to gnand device node\n";
107
108 static const char nand_stats_usage[] =
109         "Usage: %s stats dev=<gnand_device> (page|block)=<n>\n"
110         "\n"
111         "Arguments:\n"
112         "\tdev\t- path to gnand device node\n";
113
114 #endif  /* __USAGE_H */