diff options
author | Miles Bader <miles@gnu.org> | 1996-08-12 21:16:54 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-08-12 21:16:54 +0000 |
commit | 12a0396bba2f2e869168ab9824a48f385a4405f8 (patch) | |
tree | 0f40a8f4eb1a89bca885beda1760ecacf3f223ed | |
parent | 57a3024338ad8471b167466ee78b8b8cc6be1b4c (diff) |
Don't assume the edit version is <= 26.
-rw-r--r-- | libdiskfs/opts-version.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libdiskfs/opts-version.c b/libdiskfs/opts-version.c index 06d1e0be..d0d687e1 100644 --- a/libdiskfs/opts-version.c +++ b/libdiskfs/opts-version.c @@ -31,15 +31,19 @@ _print_version (FILE *stream, struct argp_state *state) fprintf (stream, "%s\n", argp_program_version); else /* Construct a version using the standard diskfs variables. */ - if (diskfs_edit_version) - fprintf (stream, "%s %d.%d%c (GNU %s)\n", - diskfs_server_name, diskfs_major_version, diskfs_minor_version, - diskfs_edit_version + 'a', HURD_RELEASE); - else - /* Construct a version using the standard diskfs variables. */ - fprintf (stream, "%s %d.%d (GNU %s)\n", + { + char *ev[15] = { 0 }; + + if (diskfs_edit_version) + if (diskfs_edit_version <= 26) + sprintf (ev, ".%c", diskfs_edit_version - 1 + 'a'); + else + sprintf (ev, ".%d", diskfs_edit_version); + + fprintf (stream, "%s %d.%d%s (GNU %s)\n", diskfs_server_name, diskfs_major_version, diskfs_minor_version, - HURD_RELEASE); + ev, HURD_RELEASE); + } } void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) |