1235537Sgber/*- 2235537Sgber * Copyright (c) 2010-2012 Semihalf. 3235537Sgber * All rights reserved. 4235537Sgber * 5235537Sgber * Redistribution and use in source and binary forms, with or without 6235537Sgber * modification, are permitted provided that the following conditions 7235537Sgber * are met: 8235537Sgber * 1. Redistributions of source code must retain the above copyright 9235537Sgber * notice, this list of conditions and the following disclaimer. 10235537Sgber * 2. Redistributions in binary form must reproduce the above copyright 11235537Sgber * notice, this list of conditions and the following disclaimer in the 12235537Sgber * documentation and/or other materials provided with the distribution. 13235537Sgber * 14235537Sgber * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15235537Sgber * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16235537Sgber * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17235537Sgber * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18235537Sgber * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19235537Sgber * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20235537Sgber * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21235537Sgber * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22235537Sgber * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23235537Sgber * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24235537Sgber * SUCH DAMAGE. 25235537Sgber * 26235537Sgber * $FreeBSD: releng/10.3/usr.sbin/nandtool/usage.h 235537 2012-05-17 10:11:18Z gber $ 27235537Sgber */ 28235537Sgber 29235537Sgber#ifndef __USAGE_H 30235537Sgber#define __USAGE_H 31235537Sgber 32235537Sgberstatic const char nand_help_usage[] = 33235537Sgber "Usage: %s help topic=<cmd>\n" 34235537Sgber "\n" 35235537Sgber "Arguments:\n" 36235537Sgber "\tcmd\t- [help|read|write|erase|readoob|writeoob|info]\n" 37235537Sgber "\n"; 38235537Sgber 39235537Sgberstatic const char nand_read_usage[] = 40235537Sgber "Usage: %s read dev=<gnand_device> (block|page|pos)=n [count=n]\n" 41235537Sgber "\n" 42235537Sgber "Arguments:\n" 43235537Sgber "\tdev\t- path to gnand device node\n" 44235537Sgber "\tblock\t- starting block or\n" 45235537Sgber "\tpage\t- starting page or\n" 46235537Sgber "\tpos\t- starting position (in bytes, must be page-aligned)\n" 47235537Sgber "\tout\t- output file (hexdump to stdout if not supplied)\n" 48235537Sgber "\n" 49235537Sgber "Note that you can only specify only one of: 'block', 'page', 'pos'\n" 50235537Sgber "parameters at once. 'count' parameter is meaningful in terms of used\n" 51235537Sgber "unit (page, block or byte).\n"; 52235537Sgber 53235537Sgberstatic const char nand_write_usage[] = 54235537Sgber "Usage: %s write dev=<gnand_device> in=<file> (block|page|pos)=n [count=n]\n" 55235537Sgber "\n" 56235537Sgber "Arguments:\n" 57235537Sgber "\tdev\t- path to gnand device node\n" 58235537Sgber "\tin\t- path to input file which be writed to gnand\n" 59235537Sgber "\tblock\t- starting block or\n" 60235537Sgber "\tpage\t- starting page or\n" 61235537Sgber "\tpos\t- starting position (in bytes, must be page-aligned)\n" 62235537Sgber "\tcount\t- byte/page/block count\n" 63235537Sgber "\n" 64235537Sgber ""; 65235537Sgber 66235537Sgberstatic const char nand_erase_usage[] = 67235537Sgber "Usage: %s erase dev=<gnand_device> (block|page|pos)=n [count=n]\n" 68235537Sgber "\n" 69235537Sgber "Arguments:\n" 70235537Sgber "\tdev\t- path to gnand device node\n" 71235537Sgber "\tblock\t- starting block or\n" 72235537Sgber "\tpage\t- starting page or\n" 73235537Sgber "\tpos\t- starting position (in bytes, muse be block-aligned)\n" 74235537Sgber "\tcount\t- byte/page/block count\n" 75235537Sgber "\n" 76235537Sgber "NOTE: position and count for erase operation MUST be block-aligned\n"; 77235537Sgber 78235537Sgberstatic const char nand_read_oob_usage[] = 79235537Sgber "Usage: %s readoob dev=<gnand_device> page=n [out=file] [count=n]\n" 80235537Sgber "\n" 81235537Sgber "Arguments:\n" 82235537Sgber "\tdev\t- path to gnand device node\n" 83235537Sgber "\tpage\t- page (page) number\n" 84235537Sgber "\tout\t- outut file (hexdump to stdout if not supplied)\n" 85235537Sgber "\tcount\t- page count (default is 1)\n" 86235537Sgber "\n" 87235537Sgber "If you supply count parameter with value other than 1, data will be\n" 88235537Sgber "read from subsequent page's OOB areas\n"; 89235537Sgber 90235537Sgberstatic const char nand_write_oob_usage[] = 91235537Sgber "Usage: %s writeoob dev=<gnand_device> in=<file> page=n [count=n]\n" 92235537Sgber "\n" 93235537Sgber "\tdev\t- path to gnand device node\n" 94235537Sgber "\tin\t- path to file containing data which will be written\n" 95235537Sgber "\tpage\t- page (page) number\n" 96235537Sgber "\n" 97235537Sgber "If you supply count parameter with value other than 1, data will be\n" 98235537Sgber "written to subsequent page's OOB areas\n"; 99235537Sgber 100235537Sgberstatic const char nand_info_usage[] = 101235537Sgber "Usage: %s info dev=<gnand_device>\n" 102235537Sgber "\n" 103235537Sgber "Arguments:\n" 104235537Sgber "\tdev\t- path to gnand device node\n"; 105235537Sgber 106235537Sgberstatic const char nand_stats_usage[] = 107235537Sgber "Usage: %s stats dev=<gnand_device> (page|block)=<n>\n" 108235537Sgber "\n" 109235537Sgber "Arguments:\n" 110235537Sgber "\tdev\t- path to gnand device node\n"; 111235537Sgber 112235537Sgber#endif /* __USAGE_H */ 113