8 Commits

Author SHA1 Message Date
Bernhard Nortmann
569f189693 Have programs display version information in their usage help
This way we don't have to introduce new options for retrieving
version info. For those programs that do not output their usage
by default (e.g. because they would process stdin), you may pass
a "-?" option to get help - and thus version information.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-10-24 14:53:02 +02:00
Bernhard Nortmann
2519a20481 phoenix_info: avoid -Wsometimes-uninitialized compiler warning
Just default the "out" variable in save_part() to "stdout".

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-05-04 22:34:27 +02:00
Bernhard Nortmann
73c20eea7b Makefile: Have portable_endian.h properly expose all functions
For Linux, this requires additional #defines, see
https://gist.github.com/panzi/6856583#gistcomment-1656524

Placing those #defines into portable_endian.h would mean we
depend on the specific order of #includes (whatever pulls
in endian.h first, including other system includes). Avoid
this by using symbols provided "globally" via the Makefile.

Also nuke the _NETBSD_SOURCE definition in fel.c

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-05-03 08:02:09 +02:00
Bernhard Nortmann
d47c3a3649 Replace endian_compat.h with portable_endian.h
Our previous include file only supplied a very limited set of
wrapper redefinitions for platforms that define __APPLE__ (i.e.
Mac OS). In particular, some needed big endian conversions were
missing, causing "symbol(s) not found" errors when linking.

Instead of patching the existing file, let's do away with it
completely and replace it by something more sophisticated.
The portable_endian.h used is in the public domain, and was
taken from https://gist.github.com/panzi/6856583

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-04-20 09:45:26 +02:00
Bernhard Nortmann
568c7a0e81 fix compiler warnings due to deprecated _BSD_SOURCE
With glibc 2.20 (and newer), defining _BSD_SOURCE (only)
will now generate compiler warnings similar to:

/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE
and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]

See the glibc 2.20 release notes, https://lwn.net/Articles/611162/.

This patch adds the required _DEFAULT_SOURCE.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
2015-09-13 23:56:46 +03:00
Alejandro Mery
bcde0fc721 move OSX compatible <endian.h> exception to a common "endian_compat.h" header 2012-08-07 00:18:34 +00:00
Henrik Nordstrom
455babd738 Add save/extract capability to phoenix_info 2012-07-02 10:02:32 +02:00
Henrik Nordstrom
75005abcff phoenix_info dumping info on phoenix sdcard image parts 2012-07-02 08:54:42 +02:00