[kgtp] r1547 committed - Update getmod....

  • From: kgtp@xxxxxxxxxxxxxx
  • To: kgtp@xxxxxxxxxxxxx
  • Date: Mon, 06 May 2013 15:23:19 +0000

Revision: 1547
Author:   teawater
Date:     Mon May  6 08:13:31 2013
Log:      Update getmod.
Add a '#' at the beginning make the output as comments if this output does not mean getmod will error quit. Add a '#' at the beginning make the add-symbol-file that cannot find module file as comments.

http://code.google.com/p/kgtp/source/detail?r=1547

Modified:
 /trunk/UPDATE
 /trunk/getmod.c

=======================================
--- /trunk/UPDATE       Wed Apr 17 01:34:19 2013
+++ /trunk/UPDATE       Mon May  6 08:13:31 2013
@@ -14,6 +14,10 @@
https://code.google.com/p/kgtp/wiki/HOWTO#Special_trace_state_variable_$self_trace
   https://code.google.com/p/kgtp/wiki/HOWTOCN#特殊trace状态变量_$self_trace

+* Update getmod.
+ Add a '#' at the beginning make the output as comments if this output does not mean getmod will error quit. + Add a '#' at the beginning make the add-symbol-file that cannot find module file as comments.
+
 *** 20130218

 * https://lkml.org/lkml/2013/2/18/145
=======================================
--- /trunk/getmod.c     Tue Sep 11 09:56:48 2012
+++ /trunk/getmod.c     Mon May  6 08:13:31 2013
@@ -56,7 +56,7 @@

        dp = opendir(dir);
        if (!dp) {
-               fprintf(stderr, "Cannot open %s: %s.\n", dir,
+               fprintf(stderr, "#Cannot open %s: %s.\n", dir,
                        strerror(errno));
                ret = -1;
                goto out;
@@ -158,13 +158,13 @@
                        }
                        if (i >= sdir_number) {
                                no_search_mod = 1;
-                               fprintf(stderr, "Cannot open any module search "
+                               fprintf(stderr, "#Cannot open any module search 
"
                                                "directories.  Auto open 
-n.\n");
                        } else
-                               fprintf(stderr, "Cannot find file %s in the module 
search "
+                               fprintf(stderr, "#Cannot find file %s in the module 
search "
                                                "directories.  Just output the 
command with filename.\n",
                                        file);
-                       printf("add-symbol-file %s %s", file, addr);
+                       printf("#add-symbol-file %s %s", file, addr);
                } else
                        printf("add-symbol-file %s %s", got_dir, addr);
        }
@@ -228,7 +228,7 @@
        struct stat     sbuf;

        if (stat(dir, &sbuf) || !S_ISDIR(sbuf.st_mode)) {
-               fprintf(stderr, "%s is not a right directory.  Ignore it.\n", 
dir);
+               fprintf(stderr, "#%s is not a right directory.  Ignore it.\n", 
dir);
                return 0;
        }

@@ -346,7 +346,7 @@
                add_sdir(get_default_sdir());
        if (!no_search_mod && sdir_number == 0) {
                no_search_mod = 1;
-               fprintf(stderr, "Cannot open any module search "
+               fprintf(stderr, "#Cannot open any module search "
                                "directories.  Auto open -n.\n");
        }

Other related posts:

  • » [kgtp] r1547 committed - Update getmod.... - kgtp