mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
e8f47cf068
Hi all, this patch adds the command "btrfs filesystem label" to change (or show) the label of a filesystem. This patch is a subset of the one written previously by Morey Roof. I included the user space part only. So it is possible only to change/show a label of a *single device* and *unounted* filesystem. The reason of excluding the kernel space part, is to simplify the patch in order to speed the check and then the merging of the patch itself. In fact I have to point out that in the past there was almost three attempts to propose this patch, without success neither complaints. Chris, let me know how you want to proceed. I know that you are very busy, and you prefer to work to stabilize btrfs instead adding new feature. But I think that changing a label is a *essential* feature for a filesystem managing tool. Think about a mount by LABEL. To show a label $ btrfs filesystem label <device> To set a label $ btrfs filesystem label <device> <newlabel> Please guys, give a look to the source. Comments are welcome. You can pull the source from the branch "label" of the repository http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git Regards G.Baroncelli Signed-off-by: Chris Mason <chris.mason@oracle.com>
36 lines
1.4 KiB
C
36 lines
1.4 KiB
C
/*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public
|
|
* License v2 as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public
|
|
* License along with this program; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 021110-1307, USA.
|
|
*/
|
|
|
|
/* btrfs_cmds.c*/
|
|
int do_clone(int nargs, char **argv);
|
|
int do_delete_subvolume(int nargs, char **argv);
|
|
int do_create_subvol(int nargs, char **argv);
|
|
int do_fssync(int nargs, char **argv);
|
|
int do_defrag(int argc, char **argv);
|
|
int do_show_filesystem(int nargs, char **argv);
|
|
int do_add_volume(int nargs, char **args);
|
|
int do_balance(int nargs, char **argv);
|
|
int do_remove_volume(int nargs, char **args);
|
|
int do_scan(int nargs, char **argv);
|
|
int do_resize(int nargs, char **argv);
|
|
int do_subvol_list(int nargs, char **argv);
|
|
int do_set_default_subvol(int nargs, char **argv);
|
|
int list_subvols(int fd);
|
|
int do_df_filesystem(int nargs, char **argv);
|
|
int find_updated_files(int fd, u64 root_id, u64 oldest_gen);
|
|
int do_find_newer(int argc, char **argv);
|
|
int do_change_label(int argc, char **argv);
|