Sophie

Sophie

distrib > Mandriva > mes5 > i586 > by-pkgid > 4e942938630a3e9b5b38bc5d0030fe32 > files > 13

e2fsprogs-1.41.2-1mnb2.src.rpm

diff -p -up e2fsprogs-1.41.1/misc/mke2fs.c.pix e2fsprogs-1.41.1/misc/mke2fs.c
--- e2fsprogs-1.41.1/misc/mke2fs.c.pix	2008-09-09 15:30:42.000000000 +0200
+++ e2fsprogs-1.41.1/misc/mke2fs.c	2008-09-09 15:42:23.000000000 +0200
@@ -86,6 +86,7 @@ char	*bad_blocks_filename;
 __u32	fs_stride;
 
 struct ext2_super_block fs_param;
+char *UUID = NULL;
 char *creator_os;
 char *volume_label;
 char *mount_dir;
@@ -108,7 +109,7 @@ static void usage(void)
 	"\t[-g blocks-per-group] [-L volume-label] "
 	"[-M last-mounted-directory]\n\t[-O feature[,...]] "
 	"[-r fs-revision] [-E extended-option[,...]]\n"
-	"\t[-T fs-type] [-jnqvFSV] device [blocks-count]\n"),
+	"\t[-T fs-type] [-U UUID] [-jnqvFSV] device [blocks-count]\n"),
 		program_name);
 	exit(1);
 }
@@ -1162,7 +1163,7 @@ static void PRS(int argc, char *argv[])
 	}
 
 	while ((c = getopt (argc, argv,
-		    "b:cf:g:G:i:jl:m:no:qr:s:t:vE:FI:J:L:M:N:O:R:ST:V")) != EOF) {
+		    "b:cf:g:G:i:jl:m:no:qr:s:t:vE:FI:J:L:M:N:O:R:ST:U:V")) != EOF) {
 		switch (c) {
 		case 'b':
 			blocksize = strtol(optarg, &tmp, 0);
@@ -1328,6 +1329,9 @@ static void PRS(int argc, char *argv[])
 		case 'T':
 			usage_types = optarg;
 			break;
+		case 'U':
+			UUID = optarg;
+			break;
 		case 'V':
 			/* Print version number and exit */
 			show_version_only++;
@@ -1875,10 +1879,13 @@ int main (int argc, char *argv[])
 	if (!noaction)
 		zap_sector(fs, 2, 6);
 
+	if (UUID)
+		uuid_parse(UUID, fs->super->s_uuid);
+	else
 	/*
 	 * Generate a UUID for it...
 	 */
-	uuid_generate(fs->super->s_uuid);
+		uuid_generate(fs->super->s_uuid);
 
 	/*
 	 * Initialize the directory index variables