liske/needrestart — pull request #1 by phillipberndt (2014-04-09 07:27:45+00:00)
Title: Support GNU formatted device ids

glibc uses a different definition of the major/minor part of device numbers:

````C
unsigned int gnu_dev_major (unsigned long long int __dev) {
return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
}

unsigned int gnu_dev_minor (unsigned long long int __dev) {
return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
}
````
I have added support for this format by checking both formats against the string from the `maps` file. I don't believe that name collisions (and device changes) are likely enough to justify a more elaborate approach.

Also, on my system, procfs prepends `(deleted)` to removed files in the `maps` file. I've added a line to removed that. It doesn't make much of a difference, because the path does still either not exist or will have a different inode, but it looks better this way IMHO.