From 443293519d7e07b484925704a0d946c0e3ee7ce9 Mon Sep 17 00:00:00 2001 From: Dean Roehrich Date: Fri, 27 May 2005 17:23:04 +0000 Subject: [PATCH 1/1] Make get_events easier to use in a script Change some output to be valid as shell variable assignments. --- dmapi/src/common/lib/print.c | 10 +++++----- dmapi/src/suite1/cmd/get_events.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dmapi/src/common/lib/print.c b/dmapi/src/common/lib/print.c index 65882892..e566fabf 100644 --- a/dmapi/src/common/lib/print.c +++ b/dmapi/src/common/lib/print.c @@ -47,10 +47,10 @@ * Define some standard formats for the printf statements below. */ -#define HDR "%s: token=%d sequence=%d\n" -#define VALS "\t%-15s %s\n" -#define VALD "\t%-15s %d\n" -#define VALLLD "\t%-15s %lld\n" +#define HDR "type=%s token=%d sequence=%d\n" +#define VALS "\t%s=%s\n" +#define VALD "\t%s=%d\n" +#define VALLLD "\t%s=%lld\n" /* @@ -204,7 +204,7 @@ print_one_data_event( } printf(VALS VALLLD VALLLD, - "file handle", handle, + "file_handle", handle, "offset", msg_de->de_offset, "length", msg_de->de_length); diff --git a/dmapi/src/suite1/cmd/get_events.c b/dmapi/src/suite1/cmd/get_events.c index 383050f5..6382050d 100644 --- a/dmapi/src/suite1/cmd/get_events.c +++ b/dmapi/src/suite1/cmd/get_events.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU General Public License as @@ -130,7 +130,7 @@ main( } exit(1); } - fprintf(stdout, "rlenp is %d\n", rlenp); + fprintf(stdout, "rlenp=%d\n", rlenp); if (rlenp == 0) return(0); -- 2.30.2