From: Bernhard W. <bw...@su...> - 2007-01-12 15:25:17
|
See $SUBJECT. --- dumputils/configdump.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) Index: lkcdutils-svn-r1339/dumputils/configdump.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lkcdutils-svn-r1339.orig/dumputils/configdump.c +++ lkcdutils-svn-r1339/dumputils/configdump.c @@ -49,6 +49,10 @@ =20 #define TOK_SIZE 132 =20 +#define DUMP_FLAGS_DISKDUMP 0x80000000 +#define DUMP_FLAGS_POLL 0x00000004 +#define DUMP_FLAGS 0x80000000 + // Kernel 2.4 LKCD ioctrl's #define DIOSDUMPDEV_4 1 /* set the dump device */ #define DIOGDUMPDEV_4 2 /* get the dump device */ @@ -160,6 +164,7 @@ twoSix_One(int level_override, struct pc struct ether_addr *ether; char devstr[512]; struct stat devdump_buf; + int flags; =20 printf("Configuring for 2.6 based kernel via sysfs\n"); =20 @@ -267,6 +272,21 @@ twoSix_One(int level_override, struct pc fprintf(fp, "%lx\n", strtoul(conf->dump_compress, NULL, 0)); fclose(fp); =20 + if ((fp =3D fopen("/sys/dump/polling", "w")) =3D=3D NULL) { + fprintf(stderr, "%s: Error - can\'t open open /sys/dump/polling: ", prog= ); + perror(""); + exit(1); + } + + flags =3D atoi(conf->dump_flags); + + if (flags & DUMP_FLAGS_POLL) + fprintf(fp, "1\n"); + else + fprintf(fp, "0\n"); + + fclose(fp); + /* Put a timeout value in /proc PANIC_PATH, based * upon the PANIC_TIMEOUT value */ |