46a47 > #include 72a74 > int uuid; 87c89 < "\t[-J journal-options] [-S volume-size] [-qvV] " --- > "\t[-J journal-options] [-S volume-size] [-qvuV] " 244a247 > { "uuid-reset", 0, 0, 'u'}, 257c260 < c = getopt_long(argc, argv, "L:N:J:S:vqVx", long_options, --- > c = getopt_long(argc, argv, "L:N:J:S:vquVx", long_options, 305a309,312 > case 'u': > opts.uuid = 1; > break; > 473a481,512 > > static void update_uuid (ocfs2_filesys *fs, int *changed) > { > unsigned char *uuid = OCFS2_RAW_SB(fs->fs_super)->s_uuid; > size_t i, max = sizeof(OCFS2_RAW_SB(fs->fs_super)->s_uuid); > uuid_t uuid_new; > > /* print out old uuid of device */ > printf ("Try to change uuid: \n"); > for(i = 0; i < max; i++) > printf("%02x ", uuid[i]); > > printf("\n"); > > /* generate new uuid */ > uuid_generate(uuid_new); > > memset (OCFS2_RAW_SB(fs->fs_super)->s_uuid, 0, OCFS2_VOL_UUID_LEN); > memcpy (OCFS2_RAW_SB(fs->fs_super)->s_uuid, uuid_new, OCFS2_VOL_UUID_LEN); > > /* print out new uuid */ > printf ("New uuid: \n"); > for(i = 0; i < max; i++) > printf("%02x ", uuid[i]); > > printf("\n"); > > *changed = 1; > > return ; > } > 555a595 > int upd_uuid = 0; 676a717,720 > /* update unique serial number of device has been selected */ > if (opts.uuid) > printf (" Change unique serial number of device \n "); > 692a737,743 > /* update the unique serial number */ > if (opts.uuid) { > update_uuid (fs, &upd_uuid); > if (upd_uuid) > printf ("Changed volume uuid \n"); > } > 729c780 < if (upd_label || upd_slots || upd_vsize) { --- > if (upd_label || upd_slots || upd_vsize || upd_uuid) {