From: Steve D. <ste...@us...> - 2004-04-29 19:04:02
|
Update of /cvsroot/evms/evms2/engine/plugins/xfs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27574 Modified Files: fs_xfs.c fsimxfs.h Log Message: Add a "Force" option for mkfs. Index: fs_xfs.c =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/xfs/fs_xfs.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- fs_xfs.c 22 Mar 2004 16:54:10 -0000 1.33 +++ fs_xfs.c 29 Apr 2004 19:03:53 -0000 1.34 @@ -923,6 +923,16 @@ option[MKFS_SETLOGSIZE_INDEX].constraint.range->increment.r32 = 0.1; option[MKFS_SETLOGSIZE_INDEX].value.r32 = 4.6; + /* Force option */ + SET_STRING(option[MKFS_FORCE_INDEX].name, "force"); + SET_STRING(option[MKFS_FORCE_INDEX].title, "Force"); + SET_STRING(option[MKFS_FORCE_INDEX].tip, "Force the mkfs even if XFS thinks the volume has an existing filesystem"); + option[MKFS_FORCE_INDEX].type = EVMS_Type_Boolean; + option[MKFS_FORCE_INDEX].unit = EVMS_Unit_None; + option[MKFS_FORCE_INDEX].flags = EVMS_OPTION_FLAGS_NOT_REQUIRED; + option[MKFS_FORCE_INDEX].constraint_type = EVMS_Collection_None; + option[MKFS_FORCE_INDEX].value.b = FALSE; + context->min_selected_objects = 1; context->max_selected_objects = 1; break; @@ -1013,6 +1023,10 @@ option[index].value.r32 = value->r32; break; + case MKFS_FORCE_INDEX: + option[index].value.b = value->b; + break; + default: break; } Index: fsimxfs.h =================================================================== RCS file: /cvsroot/evms/evms2/engine/plugins/xfs/fsimxfs.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- fsimxfs.h 20 Feb 2004 15:44:52 -0000 1.12 +++ fsimxfs.h 29 Apr 2004 19:03:53 -0000 1.13 @@ -38,8 +38,9 @@ #define MKFS_SETVOL_INDEX 0 #define MKFS_JOURNAL_VOL_INDEX 1 #define MKFS_SETLOGSIZE_INDEX 2 -#define MKFS_XFS_OPTIONS_COUNT 3 -#define MKFS_XFS_OPTIONS_COUNT_TOTAL 10 +#define MKFS_FORCE_INDEX 3 +#define MKFS_XFS_OPTIONS_COUNT 4 +#define MKFS_XFS_OPTIONS_COUNT_TOTAL 11 /* fsck exit codes */ #define FSCK_OK 0 |