1N/A * ntfslabel - Part of the Linux-NTFS project. 1N/A * Copyright (c) 2002 Matthew J. Fanto 1N/A * Copyright (c) 2002-2005 Anton Altaparmakov 1N/A * Copyright (c) 2002-2003 Richard Russon 1N/A * This program is free software; you can redistribute it and/or modify 1N/A * it under the terms of the GNU General Public License as published by 1N/A * the Free Software Foundation; either version 2 of the License, or 1N/A * (at your option) any later version. 1N/A * This program is distributed in the hope that it will be useful, 1N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 1N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1N/A * GNU General Public License for more details. 1N/A * You should have received a copy of the GNU General Public License 1N/A * along with this program (in the main directory of the Linux-NTFS 1N/A * distribution in the file COPYING); if not, write to the Free Software 1N/A * Foundation,Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 1N/A char *
label;
/* Set the label to this */ 1N/A * version - Print version information about the program 1N/A * Print a copyright statement and a brief description of the program. 1N/A * usage - Print a list of the parameters to the program 1N/A * Print a list of the parameters and options for the program. 1N/A " -n, --no-action Do not write to disk\n" 1N/A " -f, --force Use less caution\n" 1N/A " -q, --quiet Less output\n" 1N/A " -v, --verbose More output\n" 1N/A " -V, --version Display version information\n" 1N/A " -h, --help Display this help\n\n",
1N/A * parse_options - Read and validate the programs command line 1N/A * Read the command line, verify the syntax and parse the options. 1N/A * This function is very long, but quite simple. 1N/A * 0 Error, one or more problems 1N/A static const char *
sopt =
"-fh?nqvV";
1N/A opterr = 0;
/* We'll handle the errors, thank you. */ 1N/A case 1:
/* A non-option argument */ 1N/A /* Make sure we're in sync with the log levels */ 1N/A "the same time.\n");
1N/A * print_label - display the current label of a mounted ntfs partition. 1N/A * @dev: device to read the label from 1N/A * @mnt_flags: mount flags of the device or 0 if not mounted 1N/A * @mnt_point: mount point of the device or NULL 1N/A * Print the label of the device @dev. 1N/A * resize_resident_attribute_value - resize a resident attribute 1N/A * @m: mft record containing attribute to resize 1N/A * @a: attribute record (inside @m) which to resize 1N/A * @new_vsize: the new attribute value size to resize the attribute to 1N/A * Return 0 on success and -1 with errno = ENOSPC if not enough space in the 1N/A /* New attribute length and mft record bytes used. */ 1N/A /* Check for sufficient space. */ 1N/A /* Move attributes behind @a to their new location. */ 1N/A /* Adjust @m to reflect change in used space. */ 1N/A /* Adjust @a to reflect new value size. */ 1N/A * change_label - change the current label on a device 1N/A * @dev: device to change the label on 1N/A * @mnt_flags: mount flags of the device or 0 if not mounted 1N/A * @mnt_point: mount point of the device or NULL 1N/A * @label: the new label 1N/A * Change the label on the device @dev to @label. 1N/A /* If not the root fs or mounted read/write, refuse change. */ 1N/A "read-%s mounted device %s.\n",
1N/A /* The volume name attribute does not exist. Need to add it. */ 1N/A "allowed. Truncating excess characters.\n",
1N/A /* sizeof(resident attribute record header) == 24 */ 1N/A * Return: 0 Success, the program worked 1N/A * 1 Error, something went wrong