Hello community,
here is the log from the commit of package hxtools for openSUSE:Factory checked in at 2015-02-22 17:26:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hxtools (Old)
and /work/SRC/openSUSE:Factory/.hxtools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hxtools"
Changes:
--------
--- /work/SRC/openSUSE:Factory/hxtools/hxtools.changes 2014-11-24 11:08:39.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.hxtools.new/hxtools.changes 2015-02-22 17:26:51.000000000 +0100
@@ -1,0 +2,16 @@
+Sat Feb 21 09:30:47 UTC 2015 - jengelh(a)inai.de
+
+- Update to new upstream release 20150221
+* diff2php: escape <? in plain text output
+* diff2php: fix wrong placement of HTML tags
+
+-------------------------------------------------------------------
+Fri Feb 20 10:02:22 UTC 2015 - jengelh(a)inai.de
+
+- Update to new upstream release 20150220
+* sysinfo: parse info from /etc/os-release
+* gpsh: do not sort the queue at all when -z is given
+* qtar: account for changed tar behavior due to
+ Base:System/tar's new tar-recursive--files-from.patch
+
+-------------------------------------------------------------------
Old:
----
hxtools-20141112.tar.asc
hxtools-20141112.tar.xz
New:
----
hxtools-20150221.tar.asc
hxtools-20150221.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ hxtools.spec ++++++
--- /var/tmp/diff_new_pack.ptOiWw/_old 2015-02-22 17:26:52.000000000 +0100
+++ /var/tmp/diff_new_pack.ptOiWw/_new 2015-02-22 17:26:52.000000000 +0100
@@ -17,7 +17,7 @@
Name: hxtools
-Version: 20141112
+Version: 20150221
Release: 0
Summary: Collection of day-to-day tools (binaries)
License: GPL-2.0+ and WTFPL
++++++ hxtools-20141112.tar.xz -> hxtools-20150221.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/configure new/hxtools-20150221/configure
--- old/hxtools-20141112/configure 2014-11-12 17:22:05.000000000 +0100
+++ new/hxtools-20150221/configure 2015-02-21 10:29:24.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for hxtools 20141112.
+# Generated by GNU Autoconf 2.69 for hxtools 20150221.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@
# Identity of this package.
PACKAGE_NAME='hxtools'
PACKAGE_TARNAME='hxtools'
-PACKAGE_VERSION='20141112'
-PACKAGE_STRING='hxtools 20141112'
+PACKAGE_VERSION='20150221'
+PACKAGE_STRING='hxtools 20150221'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1308,7 +1308,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures hxtools 20141112 to adapt to many kinds of systems.
+\`configure' configures hxtools 20150221 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1374,7 +1374,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of hxtools 20141112:";;
+ short | recursive ) echo "Configuration of hxtools 20150221:";;
esac
cat <<\_ACEOF
@@ -1494,7 +1494,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-hxtools configure 20141112
+hxtools configure 20150221
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2078,7 +2078,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by hxtools $as_me 20141112, which was
+It was created by hxtools $as_me 20150221, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2943,7 +2943,7 @@
# Define the identity of the package.
PACKAGE='hxtools'
- VERSION='20141112'
+ VERSION='20150221'
cat >>confdefs.h <<_ACEOF
@@ -6336,7 +6336,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by hxtools $as_me 20141112, which was
+This file was extended by hxtools $as_me 20150221, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6402,7 +6402,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-hxtools config.status 20141112
+hxtools config.status 20150221
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/configure.ac new/hxtools-20150221/configure.ac
--- old/hxtools-20141112/configure.ac 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/configure.ac 2015-02-21 10:29:04.000000000 +0100
@@ -1,4 +1,4 @@
-AC_INIT([hxtools], [20141112])
+AC_INIT([hxtools], [20150221])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_PROG_INSTALL
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/cooledit/HX_diff.syntax new/hxtools-20150221/cooledit/HX_diff.syntax
--- old/hxtools-20141112/cooledit/HX_diff.syntax 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/cooledit/HX_diff.syntax 2015-02-21 10:29:04.000000000 +0100
@@ -3,7 +3,6 @@
context default
keyword linestart @@*@@ cyan
keyword linestart Index:\s brown
- keyword linestart \s black white
keyword linestart \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* cyan
keyword linestart \*\*\**\*\*\*\* cyan
keyword linestart ---*---- cyan
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/data/hxtools_dircolors new/hxtools-20150221/data/hxtools_dircolors
--- old/hxtools-20141112/data/hxtools_dircolors 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/data/hxtools_dircolors 2015-02-21 10:29:04.000000000 +0100
@@ -165,7 +165,8 @@
.mp4 0;36 # MPEG-4 video
.mpeg 0;36
.mpg 0;36 # MPEG video
-.ogg 0;36 # OGG container
+.ogg 0;36 # OGG container (usually with Vorbis audio stream)
+.opus 0;36 # OGG container with Opus audio stream
.pbm 0;36 # Portable Bitmap
.pcx 0;36 # ZSoft Paintbrush
.pgm 0;36 # Portable graymap
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/sdevel/diff2php new/hxtools-20150221/sdevel/diff2php
--- old/hxtools-20141112/sdevel/diff2php 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/sdevel/diff2php 2015-02-21 10:29:04.000000000 +0100
@@ -13,7 +13,8 @@
my %C = qw(black 000000 red AA0000 green 00AA00 brown AA5500
blue 0000AA magenta AA00AA cyan 00AAAA gray AAAAAA
dgray 555555 hred FF0000 hgreen 00FF00 yellow FFFF00
- hblue 0000FF hmagenta FF00FF hcyan 00FFFF white FFFFFF);
+ hblue 0000FF hmagenta FF00FF hcyan 00FFFF white FFFFFF
+ dblue 000080);
my $F = "</font>";
my %D;
my @keep;
@@ -31,6 +32,7 @@
while (defined(my $ln = <STDIN>)) {
push(@keep, $ln);
+ $ln =~ s{<\?}{<\?php echo "<?"; ?>}g;
print $ln;
}
@@ -40,7 +42,7 @@
<style type="text/css">
a { color: B0B0B0; }
</style>
-<body style="background-color: #$C{blue}; color: #$C{gray};">
+<body style="background-color: #$C{dblue}; color: #$C{gray};">
<p><a href="?1"><i>Download this file as TXT</i></a></p>
<hr />
<pre>
@@ -63,14 +65,13 @@
$line =~ s/^(\!.*)/$D{yellow}$1$F/ ||
$line =~ s/^(\?.*)/$D{brown}$1$F/ ||
$line =~ s/^((RCS|retrieving)\s.*)/$D{brown}$1$F/ ||
- $line =~ s/^((Only|Common|File|Files|Binary)\s.*)/$D{hblue}$1$F/ ||
- $line =~ s/^ (.*)/<span style="background-color: #$C{gray};"> <\/span>$1/;
+ $line =~ s/^((Only|Common|File|Files|Binary)\s.*)/$D{hblue}$1$F/;
print $line, "\n";
}
print <<"--EOF";
</pre>
-<?php } ?>
</body>
</html>
+<?php } ?>
--EOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/bsvplay.c new/hxtools-20150221/smm/bsvplay.c
--- old/hxtools-20141112/smm/bsvplay.c 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/bsvplay.c 2015-02-21 10:29:04.000000000 +0100
@@ -26,10 +26,7 @@
};
static struct pcspkr pcsp = {
- .format = PCSPKR_16,
.sample_rate = 48000,
- .prop_square = 1,
- .prop_sine = 1,
.volume = 0.1,
};
@@ -106,10 +103,6 @@
.help = "Play only this tick in a tick block"},
{.sh = 'Z', .type = HXTYPE_NONE, .ptr = &no_zero_ticks,
.help = "Skip over silenced ticks"},
- {.sh = 'i', .type = HXTYPE_DOUBLE, .ptr = &pcsp.prop_sine,
- .help = "Proportion of sine-wave calculation mixed in"},
- {.sh = 'q', .type = HXTYPE_DOUBLE, .ptr = &pcsp.prop_square,
- .help = "Proportion of square-wave calculation mixed in"},
{.sh = 'r', .type = HXTYPE_UINT, .ptr = &pcsp.sample_rate,
.help = "Sample rate (default: 48000)"},
HXOPT_AUTOHELP,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/gpsh new/hxtools-20150221/smm/gpsh
--- old/hxtools-20141112/smm/gpsh 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/gpsh 2015-02-21 10:29:04.000000000 +0100
@@ -40,6 +40,12 @@
"x" => \$opt_nomixes,
"z" => sub { $opt_shuffle = 0 },
"v" => \$opt_verbose,
+ "af=s" => sub {
+ push(@opt_mplayer, "-af", $_[1]);
+ },
+ "loop=s" => sub {
+ push(@opt_mplayer, "-loop", $_[1]);
+ },
"O=s" => sub {
if ($_[1] =~ s/^M,//) {
push(@opt_mplayer, $_[1]);
@@ -89,9 +95,8 @@
if ($opt_listonly) {
return;
}
- @$queue = sort { $a cmp $b } @$queue;
if ($opt_shuffle) {
- @$queue = sort s_random @$queue;
+ @$queue = sort s_random sort { $a cmp $b } @$queue;
}
&queue_play($index, $queue);
}
@@ -164,7 +169,7 @@
{
my $ext = lc shift @_;
- foreach my $t (qw(.it .s3m .xm .mod .xm2)) {
+ foreach my $t (qw(.it .s3m .xm .mod .xm2 .j2b)) {
if ($ext eq $t) {
return 1;
}
@@ -320,7 +325,8 @@
if (&filename_meta($ext)) {
next;
}
- my $title = &filename_nonext($file);
+ my $title = $file;
+ #my $title = &filename_nonext($file);
$track_list->{$title} = {"file" => $file};
}
@@ -332,7 +338,7 @@
}
# Mark this title as being a mix and/or part of a mix
- my $parent_title = &filename_nonext($af);
+ my $parent_title = $af; #&filename_nonext($af);
$track_list->{$parent_title}->{"ofs"} = 0;
if (!open(FH, "< $file")) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/move_moov new/hxtools-20150221/smm/move_moov
--- old/hxtools-20141112/smm/move_moov 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/move_moov 2015-02-21 10:29:04.000000000 +0100
@@ -1,6 +1,10 @@
#!/usr/bin/perl
+use Getopt::Long;
use IPC::Open3;
+our $novideo = 0;
+&Getopt::Long::Configure(qw(bundling));
+&GetOptions("n" => \$novideo);
&main();
sub main
@@ -15,7 +19,8 @@
my $input = shift @_;
local(*CIN, *COUT);
my $pid = open3(\*CIN, \*COUT, \*COUT,
- "ffmpeg", "-i", $input, "-acodec", "copy", "-vcodec", "copy",
+ "ffmpeg", "-i", $input, "-acodec", "copy",
+ $novideo ? ("-vn") : ("-vcodec", "copy"),
"-moov_size", "4", "-y", ".moov.mp4");
close CIN;
@@ -27,7 +32,8 @@
# Run with exact moov_size
print "$input: moov_size=$moov_size\n";
$pid = open3(\*CIN, \*COUT, \*COUT,
- "ffmpeg", "-i", $input, "-acodec", "copy", "-vcodec", "copy",
+ "ffmpeg", "-i", $input, "-acodec", "copy",
+ $novideo ? ("-vn") : ("-vcodec", "copy"),
"-moov_size", $moov_size, "-y", ".moov.mp4");
close CIN;
while (defined(my $line = <COUT>)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/pcspkr.h new/hxtools-20150221/smm/pcspkr.h
--- old/hxtools-20141112/smm/pcspkr.h 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/pcspkr.h 2015-02-21 10:29:04.000000000 +0100
@@ -8,16 +8,10 @@
extern "C" {
#endif
-enum pcspkr_format {
- PCSPKR_8 = 8,
- PCSPKR_16 = 16,
-};
-
struct pcspkr {
- double prop_square, prop_sine, volume;
+ double volume;
FILE *file_ptr;
unsigned int sample_rate;
- enum pcspkr_format format;
};
extern void pcspkr_output(const struct pcspkr *, long, long, long);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/pcspkr_pcm.c new/hxtools-20150221/smm/pcspkr_pcm.c
--- old/hxtools-20141112/smm/pcspkr_pcm.c 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/pcspkr_pcm.c 2015-02-21 10:29:04.000000000 +0100
@@ -13,58 +13,6 @@
#include "pcspkr.h"
/**
- * dynamic_qi
- * @pcsp: pc speaker struct
- * @x: time
- *
- * A pure sine wave does not sound at all like a PC speaker. A square wave on
- * the other hand is very hard (hardness, not difficulty). Mix square and sine
- * according to parameters.
- */
-static inline double dynamic_qi(const struct pcspkr *pcsp, double x)
-{
- double i = sin(x);
- double q = (i > 0) ? 1 : -1;
-
- return (pcsp->prop_square * q + pcsp->prop_sine * i) /
- (pcsp->prop_square + pcsp->prop_sine);
-}
-
-static void pcm_u8(const struct pcspkr *pcsp, long frequency,
- long duration, long af_pause)
-{
- uint8_t value;
- long sample;
-
- for (sample = 0; sample < duration; ++sample) {
- value = 127 * dynamic_qi(pcsp,
- 2.0 * M_PI * frequency * sample / pcsp->sample_rate) *
- pcsp->volume + 127;
- fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
- }
- value = 0;
- for (sample = 0; sample < af_pause; ++sample)
- fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
-}
-
-static void pcm_s16(const struct pcspkr *pcsp, long frequency,
- long duration, long af_pause)
-{
- int16_t value;
- long sample;
-
- for (sample = 0; sample < duration; ++sample) {
- value = 32767 * dynamic_qi(pcsp,
- 2.0 * M_PI * frequency * sample / pcsp->sample_rate) *
- pcsp->volume;
- fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
- }
- value = 0;
- for (sample = 0; sample < af_pause; ++sample)
- fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
-}
-
-/**
* pcspkr_output - produce waves
* @state: pcspkr state
* @frequency: tone frequency
@@ -78,32 +26,24 @@
void pcspkr_output(const struct pcspkr *pcsp, long frequency,
long duration, long af_pause)
{
- switch (pcsp->format) {
- case PCSPKR_8:
- pcm_u8(pcsp, frequency, duration, af_pause);
- break;
- case PCSPKR_16:
- pcm_s16(pcsp, frequency, duration, af_pause);
- break;
+ int16_t value;
+ long sample;
+
+ for (sample = 0; sample < duration; ++sample) {
+ double q = sin(2.0 * M_PI * frequency * sample / pcsp->sample_rate);
+ value = 32767 * pcsp->volume * (q > 0 ? 1 : -1);
+ fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
}
+ value = 0;
+ for (sample = 0; sample < af_pause; ++sample)
+ fwrite(&value, sizeof(value), 1, pcsp->file_ptr);
}
void pcspkr_silence(const struct pcspkr *pcsp, long duration)
{
static const uint16_t value_16 = 0;
- static const uint8_t value_8 = 0;
long sample;
- switch (pcsp->format) {
- case PCSPKR_8:
- for (sample = 0; sample < duration; ++sample)
- fwrite(&value_8, sizeof(value_8),
- 1, pcsp->file_ptr);
- break;
- case PCSPKR_16:
- for (sample = 0; sample < duration; ++sample)
- fwrite(&value_16, sizeof(value_16),
- 1, pcsp->file_ptr);
- break;
- }
+ for (sample = 0; sample < duration; ++sample)
+ fwrite(&value_16, sizeof(value_16), 1, pcsp->file_ptr);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/smm/qplay.c new/hxtools-20150221/smm/qplay.c
--- old/hxtools-20141112/smm/qplay.c 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/smm/qplay.c 2015-02-21 10:29:04.000000000 +0100
@@ -29,10 +29,7 @@
static double notemap[MAX_OCTAVES*12], glob_mode = 7.0 / 8;
static int glob_spd = 120, glob_len = 4, glob_octave = 4;
static struct pcspkr pcsp = {
- .format = PCSPKR_16,
.sample_rate = 48000,
- .prop_square = 1,
- .prop_sine = 1,
.volume = 0.1,
};
@@ -408,10 +405,6 @@
int main(int argc, const char **argv)
{
static const struct HXoption options_table[] = {
- {.sh = 'i', .type = HXTYPE_DOUBLE, .ptr = &pcsp.prop_sine,
- .help = "Proportion of sine-wave calculation mixed in"},
- {.sh = 'q', .type = HXTYPE_DOUBLE, .ptr = &pcsp.prop_square,
- .help = "Proportion of square-wave calculation mixed in"},
{.sh = 'r', .type = HXTYPE_UINT, .ptr = &pcsp.sample_rate,
.help = "Sample rate (default: 48000)"},
HXOPT_AUTOHELP,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/suser/fxterm new/hxtools-20150221/suser/fxterm
--- old/hxtools-20141112/suser/fxterm 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/suser/fxterm 2015-02-21 10:29:04.000000000 +0100
@@ -3,9 +3,14 @@
# fxterm - work around strange xterm font handling
# Requires that the same font is available with and without _b suffix.
#
-# Common usage:
+# Usage examples.
+# Use tosh.pcf & tosh_b.pcf with CJK input support:
# fxterm -f tosh -j -- [other xterm options]
-#
+# Just fixup my colors:
+# fxterm -- [xterm options]
+# fxterm -fa "DejaVu Sans Mono:size=32"
+# "--" terminates processing fxterm options, as do any unrecognized
+# option, so you may drop "--" in certain circumstances.
export GTK_IM_MODULE="ibus";
export QT_IM_MODULE="ibus";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/suser/qtar new/hxtools-20150221/suser/qtar
--- old/hxtools-20141112/suser/qtar 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/suser/qtar 2015-02-21 10:29:04.000000000 +0100
@@ -26,7 +26,7 @@
{
Getopt::Long::Configure(qw(bundling pass_through));
GetOptions(
- "x" => sub { push(@excludes, qr{(?:^|/)(?:\.git|\.svn|\.hg|CVS)(?:/|$)}); },
+ "x" => sub { push(@excludes, qr{(?:^|/)(?:\.git|\.svn|\.bzr|\.hg|CVS)(?:/|$)}); },
"svn" => sub { $strategy = "by_basename"; }, # lame alias I agree
"ext" => sub { $strategy = "by_extension"; },
"use=s" => sub { $packer = $_[1]; },
@@ -128,9 +128,9 @@
{
local *COUT;
my @args = (
- "tar", "-T-", "--null",
+ "tar", "--no-recursion", "--null", "-T-",
defined($packer) ? "--use=$packer" : (),
- "--no-recursion", "--owner=root", "--group=root",
+ "--owner=root", "--group=root",
"-cvf", $_[0], @{$_[2]},
);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hxtools-20141112/suser/sysinfo.c new/hxtools-20150221/suser/sysinfo.c
--- old/hxtools-20141112/suser/sysinfo.c 2014-11-12 17:21:51.000000000 +0100
+++ new/hxtools-20150221/suser/sysinfo.c 2015-02-21 10:29:04.000000000 +0100
@@ -1,6 +1,6 @@
/*
- * sysinfo.c -
- * Copyright © Jan Engelhardt <jengelh [at] medozas de>, 2005 - 2012
+ * sysinfo.c - print banner with general system information
+ * Copyright Jan Engelhardt, 2005–2015
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -36,6 +36,7 @@
struct sy_block {
struct utsname uts;
+ struct HXmap *osrel;
unsigned int num_cpu_threads, num_tasks;
char *cpu_vendor, *cpu_arch;
hxmc_t *cpu_model_name;
@@ -47,6 +48,7 @@
unsigned int display_width, display_height;
};
+static const char *sy_osrelease_file = "/etc/os-release";
static const char *sy_cpuinfo_file = "/proc/cpuinfo";
static const char sysfs_cpu_dir[] = "/sys/devices/system/cpu";
static unsigned int sy_verbose;
@@ -338,9 +340,21 @@
static void sy_dump(const struct sy_block *sib)
{
/* system */
- printf("(by hxtools sysinfo) [%s] %s %s %s",
- sib->uts.nodename, sib->uts.sysname, sib->uts.release,
- sib->uts.machine);
+ printf("(by hxtools sysinfo) [%s]", sib->uts.nodename);
+ if (sib->osrel != NULL) {
+ const char *s = HXmap_get(sib->osrel, "NAME");
+ if (s != NULL) {
+ printf(" %s", s);
+ s = HXmap_get(sib->osrel, "VERSION_ID");
+ if (s == NULL)
+ s = HXmap_get(sib->osrel, "VERSION");
+ if (s != NULL)
+ printf(" %s", s);
+ printf(" |");
+ }
+ }
+ printf(" %s %s %s",
+ sib->uts.sysname, sib->uts.release, sib->uts.machine);
/* cpu */
if (sib->num_cpu_threads == 0)
@@ -420,6 +434,7 @@
memset(&sib, 0, sizeof(sib));
sib.disk_total = -1;
uname(&sib.uts);
+ sib.osrel = HX_shconfig_map(sy_osrelease_file);
sy_num_cpu_threads(&sib);
sy_proc_cpuinfo(&sib);
sy_cpupower(&sib);
@@ -429,5 +444,6 @@
sy_gfx_hardware(&sib);
sy_display_size(&sib);
sy_dump(&sib);
+ HXmap_free(sib.osrel);
return EXIT_SUCCESS;
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org