read/write/trunc events are managed region events--print a warning if
authorDean Roehrich <roehrich@sgi.com>
Tue, 13 Nov 2001 15:10:47 +0000 (15:10 +0000)
committerDean Roehrich <roehrich@sgi.com>
Tue, 13 Nov 2001 15:10:47 +0000 (15:10 +0000)
we try to set them with this tool.  (I get bitten by this, and confused by
it, too often)

dmapi/src/suite1/cmd/set_eventlist.c

index bbc8623a9e3f0b139a42195b6f062f2768c5bb3b..fb2d969045dbacfa341269d4e7dc613793c0c082 100644 (file)
@@ -167,6 +167,12 @@ main(
                        fprintf(stderr, "invalid event %s\n", argv[optind]);
                        usage();
                }
+               if ((event == DM_EVENT_READ) || (event == DM_EVENT_WRITE) ||
+                   (event == DM_EVENT_TRUNCATE)) {
+                       fprintf(stderr, "Use set_region to twiddle read/write/trunc events\n");
+                       exit(1);
+               }
+
                DMEV_SET(event, eventset);
        }