~ubuntu-branches/ubuntu/saucy/procps/saucy-updates

« back to all changes in this revision

Viewing changes to .pc/proc_version_constructor.patch/proc/version.c

  • Committer: Steve Langasek
  • Date: 2011-10-27 07:46:06 UTC
  • mfrom: (2.1.14 sid)
  • Revision ID: vorlon@debian.org-20111027074606-wn1i46boq2ti8p1z
Merge Debian version 1:3.2.8-11

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
static void init_Linux_version(void) __attribute__((constructor));
37
37
static void init_Linux_version(void) {
38
 
    int x = 0, y = 0, z = 0;    /* cleared in case sscanf() < 3 */
 
38
    int x = 0, y = 0, z = 0;    /* cleared in case sscanf() < 2 */
39
39
    FILE *fp;
40
40
    char buf[256];
41
41
    
49
49
      exit(1);
50
50
    }
51
51
    fclose(fp);
52
 
    if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 3)
 
52
    if (sscanf(buf, "Linux version %d.%d.%d", &x, &y, &z) < 2)
53
53
        fprintf(stderr,         /* *very* unlikely to happen by accident */
54
54
                "Non-standard uts for running kernel:\n"
55
55
        "release %s=%d.%d.%d gives version code %d\n",