Hello community, here is the log from the commit of package dfc for openSUSE:Factory checked in at 2017-10-26 18:45:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dfc (Old) and /work/SRC/openSUSE:Factory/.dfc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dfc" Thu Oct 26 18:45:52 2017 rev:4 rq:536723 version:3.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/dfc/dfc.changes 2017-04-24 09:49:19.799322143 +0200 +++ /work/SRC/openSUSE:Factory/.dfc.new/dfc.changes 2017-10-26 18:46:01.379361792 +0200 @@ -1,0 +2,11 @@ +Thu Oct 26 08:12:44 UTC 2017 - [email protected] + +- Update to version 3.1.1: + * fix a typo in the compilation instructions in the readme file + * fix an old bug (4+ years) which messed up colors in HTML export + when a configuration file is used + * fix a bug which prevented some file systems to be displayed + when the filtering option was used + * fix a bad implicit fallthrough + +------------------------------------------------------------------- Old: ---- dfc-3.1.0.tar.gz New: ---- dfc-3.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dfc.spec ++++++ --- /var/tmp/diff_new_pack.WTUwJ0/_old 2017-10-26 18:46:02.511308958 +0200 +++ /var/tmp/diff_new_pack.WTUwJ0/_new 2017-10-26 18:46:02.511308958 +0200 @@ -18,13 +18,13 @@ Name: dfc -Version: 3.1.0 +Version: 3.1.1 Release: 0 Summary: Display file system space usage using graphs and colors License: BSD-3-Clause Group: Productivity/File utilities Url: http://projects.gw-computing.net/projects/dfc/ -Source0: http://projects.gw-computing.net/attachments/download/614/%{name}-%{version}.tar.gz +Source0: http://projects.gw-computing.net/attachments/download/615/%{name}-%{version}.tar.gz BuildRequires: cmake Recommends: %{name}-lang @@ -48,7 +48,6 @@ %find_lang %{name} --with-man %files -%defattr(-,root,root,-) %doc AUTHORS.md CHANGELOG.md README.md LICENSE HACKING.md TRANSLATORS.md %dir %{_sysconfdir}/xdg/dfc/ %config(noreplace) %{_sysconfdir}/xdg/dfc/dfcrc @@ -56,7 +55,6 @@ %{_mandir}/man1/dfc.1%{ext_man} %files lang -f %{name}.lang -%defattr(-,root,root,-) %dir %{_sysconfdir}/xdg/dfc/ %dir %{_sysconfdir}/xdg/dfc/fr/ %config(noreplace) %{_sysconfdir}/xdg/dfc/fr/dfcrc ++++++ dfc-3.1.0.tar.gz -> dfc-3.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/AUTHORS.md new/dfc-3.1.1/AUTHORS.md --- old/dfc-3.1.0/AUTHORS.md 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/AUTHORS.md 2017-09-09 09:11:03.000000000 +0200 @@ -15,6 +15,7 @@ * Sylvain Laperche * Tobias Patzl * Michiel Pater + * George Angelopoulos ## TRANSLATORS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/CHANGELOG.md new/dfc-3.1.1/CHANGELOG.md --- old/dfc-3.1.0/CHANGELOG.md 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/CHANGELOG.md 2017-09-09 09:11:03.000000000 +0200 @@ -1,5 +1,16 @@ # CHANGELOG +## version 3.1.1 + +BUGS: + + * fix a typo in the compilation instructions in the readme file + * fix an old bug (4+ years) which messed up colors in HTML export when a + configuration file is used + * fix a bug which prevented some file systems to be displayed when the + filtering option was used + * fix a bad implicit fallthrough + ## version 3.1.0 BUGS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/CMakeLists.txt new/dfc-3.1.1/CMakeLists.txt --- old/dfc-3.1.0/CMakeLists.txt 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/CMakeLists.txt 2017-09-09 09:11:03.000000000 +0200 @@ -5,7 +5,7 @@ set(PACKAGE ${CMAKE_PROJECT_NAME}) set(VERSION_MAJOR 3) set(VERSION_MINOR 1) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) execute_process( COMMAND git rev-parse --short HEAD WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} @@ -226,6 +226,7 @@ "^${PROJECT_SOURCE_DIR}/build/" "${PROJECT_SOURCE_DIR}/.gitignore$" "${PROJECT_SOURCE_DIR}/po/dfc.pot$" + "${PROJECT_SOURCE_DIR}/res/" "${CPACK_SOURCE_IGNORE_FILES}") include(CPack) add_custom_target(dist diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/README.md new/dfc-3.1.1/README.md --- old/dfc-3.1.0/README.md 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/README.md 2017-09-09 09:11:03.000000000 +0200 @@ -5,6 +5,8 @@ such as HTML, JSON and CSV export, multiple filtering options, the ability to show mount options and so on. + + ## BUILD `cmake` is required to build `dfc`. For convenience, a simple `Makefile` (which @@ -88,7 +90,7 @@ installed. This needs to be done when using the `cmake` command. Example (from the previously created build directory): - cmake .. -DPREFIX=/usr -DSYSSCONFDIR=/etc -DCMAKE_BUILD_TYPE=RELEASE + cmake .. -DPREFIX=/usr -DSYSCONFDIR=/etc -DCMAKE_BUILD_TYPE=RELEASE Then run the `make install` and it will install `dfc` according to what you chose in the previous step. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/man/dfc.1 new/dfc-3.1.1/man/dfc.1 --- old/dfc-3.1.0/man/dfc.1 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/man/dfc.1 2017-09-09 09:11:03.000000000 +0200 @@ -1,4 +1,4 @@ -.TH dfc 1 "April 09, 2017" "version 3.1.0" "USER COMMANDS" +.TH dfc 1 "September 09, 2017" "version 3.1.1" "USER COMMANDS" .SH NAME dfc \- report file system space usage information with style .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/man/fr/dfc.1 new/dfc-3.1.1/man/fr/dfc.1 --- old/dfc-3.1.0/man/fr/dfc.1 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/man/fr/dfc.1 2017-09-09 09:11:03.000000000 +0200 @@ -1,4 +1,4 @@ -.TH dfc 1 "Le 09 Avril 2017" "version 3.1.0" "COMMANDES UTILISATEURS" +.TH dfc 1 "Le 09 Septembre 2017" "version 3.1.1" "COMMANDES UTILISATEURS" .SH NOM dfc \- rapporte avec style l'utilisation de l'espace disque des systèmes de fichiers .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/man/nl/dfc.1 new/dfc-3.1.1/man/nl/dfc.1 --- old/dfc-3.1.0/man/nl/dfc.1 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/man/nl/dfc.1 2017-09-09 09:11:03.000000000 +0200 @@ -1,4 +1,4 @@ -.TH dfc 1 "09 April, 2017" "version 3.1.0" "USER COMMANDS" +.TH dfc 1 "09 September, 2017" "version 3.1.1" "USER COMMANDS" .SH NAME dfc \- geef het gebruik van het bestandssysteem weer met behulp van grafieken en kleuren .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/po/fr.po new/dfc-3.1.1/po/fr.po --- old/dfc-3.1.0/po/fr.po 2017-04-09 11:36:46.000000000 +0200 +++ new/dfc-3.1.1/po/fr.po 2017-09-09 09:11:33.000000000 +0200 @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: dfc 3.0.0-devel\n" +"Project-Id-Version: dfc 3.1.1\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2017-04-09 11:36+0200\n" +"POT-Creation-Date: 2017-09-09 09:11+0200\n" "PO-Revision-Date: 2012-04-15 13:52+0200\n" "Last-Translator: Robin Hahling <[email protected]>\n" "Language-Team: French\n" @@ -122,7 +122,7 @@ msgid "Error: no value for %s in configuration file\n" msgstr "Erreur: aucune valeur pour %s dans le fichier de configuration\n" -#: src/dotfile.c:225 src/dotfile.c:245 +#: src/dotfile.c:224 src/dotfile.c:244 #, c-format msgid "" "Value conversion failed for graph_medium: %s. What were you expecting with " @@ -131,117 +131,116 @@ "La conversion de la valeur a échoué pour graph_medium: %s. Qu'espériez-vous " "de toute façon?\n" -#: src/dotfile.c:230 +#: src/dotfile.c:229 #, c-format msgid "Medium value cannot be set below 0: %s\n" msgstr "La valeur medianne ne peut pas être fixée en dessous de 0: %s\n" -#: src/dotfile.c:233 +#: src/dotfile.c:232 #, c-format msgid "Medium value cannot be set above 100: %s\n" msgstr "La valeur médianne ne peut pas être fixée en dessus de 100: %s\n" -#: src/dotfile.c:250 +#: src/dotfile.c:249 #, c-format msgid "High value cannot be set below 0: %s\n" msgstr "La valeur haute ne peut pas être fixée en dessous de 0: %s\n" -#: src/dotfile.c:253 +#: src/dotfile.c:252 #, c-format msgid "High value cannot be set above 100: %s\n" msgstr "La valeur haute ne peut pas être fixée en dessus de 100: %s\n" -#: src/dotfile.c:263 +#: src/dotfile.c:262 #, c-format msgid "Wrong symbol value: %s\n" msgstr "Symbole impossible: %s\n" -#: src/dotfile.c:344 +#: src/dotfile.c:315 #, c-format msgid "Wrong csv separator: %s\n" msgstr "Séparateur csv invalide: %s\n" -#: src/dotfile.c:349 +#: src/dotfile.c:320 #, c-format msgid "Error: unknown option in configuration file: %s\n" msgstr "Erreur: option inconnue dans le fichier de configuration: %s\n" -#: src/dotfile.c:358 +#: src/dotfile.c:328 #, c-format -msgid "Unknown boolean value: %s\n" -msgstr "Valeur booléenne inconnue: %s\n" +msgid "Unknown boolean value for '%s': %s\n" +msgstr "Valeur booléenne inconnue pour '%s': %s\n" -#: src/dotfile.c:363 +#: src/dotfile.c:332 #, c-format -msgid "Unknown color value: %s\n" -msgstr "Couleur inconnue: %s\n" +msgid "Unknown color value for '%s': %s\n" +msgstr "Couleur inconnue pour '%s': %s\n" -#: src/dotfile.c:368 +#: src/dotfile.c:336 #, c-format -msgid "Not a valid HTML color: %s\n" -msgstr "Couleur HTML invalide: %s\n" +msgid "Not a valid HTML color for '%s': %s\n" +msgstr "Couleur HTML invalide pour '%s': %s\n" -#: src/dotfile.c:373 +#: src/dotfile.c:340 #, c-format -msgid "Could not assign value from configuration file: %s\n" -msgstr "" -"Impossible d'assigner une valeur depuis le fichier de configuration: %s\n" +msgid "Cannot assign value for '%s': %s\n" +msgstr "Impossible d'assigner une valeur pour '%s': %s\n" -#: src/util.c:509 src/export/html.c:157 src/export/tex.c:140 +#: src/util.c:510 src/export/html.c:157 src/export/tex.c:140 #: src/export/text.c:101 msgid "FILESYSTEM" msgstr "SYSTÈME DE FICHIERS" -#: src/util.c:510 src/export/html.c:160 src/export/tex.c:142 +#: src/util.c:511 src/export/html.c:160 src/export/tex.c:142 #: src/export/text.c:104 msgid "TYPE" msgstr "TYPE" -#: src/util.c:512 src/export/html.c:164 src/export/text.c:114 +#: src/util.c:513 src/export/html.c:164 src/export/text.c:114 msgid "%USED" msgstr "%UTILISÉ" -#: src/util.c:513 src/export/html.c:166 src/export/tex.c:147 +#: src/util.c:514 src/export/html.c:166 src/export/tex.c:147 #: src/export/text.c:117 msgid "USED" msgstr " UT." -#: src/util.c:514 src/export/html.c:167 src/export/tex.c:148 +#: src/util.c:515 src/export/html.c:167 src/export/tex.c:148 #: src/export/text.c:119 msgid "AVAILABLE" msgstr "DISPO." -#: src/util.c:515 src/export/csv.c:104 src/export/html.c:168 +#: src/util.c:516 src/export/csv.c:104 src/export/html.c:168 #: src/export/tex.c:149 src/export/text.c:120 #, c-format msgid "TOTAL" msgstr "TOTAL" -#: src/util.c:516 src/export/html.c:171 src/export/text.c:123 +#: src/util.c:517 src/export/html.c:171 src/export/text.c:123 msgid "#INODES" msgstr "#INODES" -#: src/util.c:517 src/export/csv.c:108 src/export/html.c:172 +#: src/util.c:518 src/export/csv.c:108 src/export/html.c:172 #: src/export/text.c:124 #, c-format msgid "AV.INODES" msgstr "INODES DISP." -#: src/util.c:518 src/export/csv.c:112 src/export/html.c:176 +#: src/util.c:519 src/export/csv.c:112 src/export/html.c:176 #: src/export/tex.c:155 src/export/text.c:131 msgid "MOUNTED ON" msgstr "MONTÉ SUR" -#: src/util.c:519 src/export/html.c:179 src/export/tex.c:157 +#: src/util.c:520 src/export/html.c:179 src/export/tex.c:157 #: src/export/text.c:134 msgid "MOUNT OPTIONS" msgstr "OPTIONS DE MONTAGE" -#: src/util.c:544 +#: src/util.c:545 msgid "Cannot compute required width\n" msgstr "Impossible de calculer la largeur requise\n" -#: src/util.c:620 +#: src/util.c:621 msgid "" "WARNING: TTY too narrow. Some options have been disabled to make dfc output " "fit (use -f to override).\n" @@ -249,7 +248,7 @@ "AVERTISSEMENT: le TTY est trop étroit. Certaines options ont été désactivées " "afin d'ajuster l'affichage (utilisez -f afin d'outrepasser).\n" -#: src/util.c:666 +#: src/util.c:667 msgid "WARNING: Output still messed up. Enlarge your terminal if you can...\n" msgstr "" "AVERTISSEMENT: l'affichage est toujours perturbé. Agrandissez votre terminal " @@ -332,12 +331,12 @@ msgid "SUM:" msgstr "SOM:" -#: src/platform/services-bsd.c:350 +#: src/platform/services-bsd.c:353 #, c-format msgid "Could not retrieve mount flags for %s\n" msgstr "Impossible de récupérer les options de montage pour %s\n" -#: src/platform/services-bsd.c:379 +#: src/platform/services-bsd.c:382 #, c-format msgid "Truncating mount options for %s\n" msgstr "Troncation des options de montage pour %s\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/po/nl.po new/dfc-3.1.1/po/nl.po --- old/dfc-3.1.0/po/nl.po 2017-04-09 11:36:45.000000000 +0200 +++ new/dfc-3.1.1/po/nl.po 2017-09-09 09:11:33.000000000 +0200 @@ -5,9 +5,9 @@ # msgid "" msgstr "" -"Project-Id-Version: dfc 3.1.0\n" +"Project-Id-Version: dfc 3.1.1\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2017-04-09 11:36+0200\n" +"POT-Creation-Date: 2017-09-09 09:11+0200\n" "PO-Revision-Date: 2016-04-15 02:02+0200\n" "Last-Translator: Michiel Pater <[email protected]>\n" "Language-Team: Dutch\n" @@ -122,7 +122,7 @@ msgid "Error: no value for %s in configuration file\n" msgstr "Fout: geen waarde voor %s in configuratiebestand\n" -#: src/dotfile.c:225 src/dotfile.c:245 +#: src/dotfile.c:224 src/dotfile.c:244 #, c-format msgid "" "Value conversion failed for graph_medium: %s. What were you expecting with " @@ -131,116 +131,116 @@ "Waarde conversie mislukt voor graph_medium: %s. Wat had u verwacht metzoiets " "hoe dan ook?\n" -#: src/dotfile.c:230 +#: src/dotfile.c:229 #, c-format msgid "Medium value cannot be set below 0: %s\n" msgstr "Gemiddelde waarde kan niet worden ingesteld beneden 0: %s\n" -#: src/dotfile.c:233 +#: src/dotfile.c:232 #, c-format msgid "Medium value cannot be set above 100: %s\n" msgstr "Gemiddelde waarde kan niet worden ingesteld boven 100: %s\n" -#: src/dotfile.c:250 +#: src/dotfile.c:249 #, c-format msgid "High value cannot be set below 0: %s\n" msgstr "Hoge waarde kan niet worden ingesteld beneden 0: %s\n" -#: src/dotfile.c:253 +#: src/dotfile.c:252 #, c-format msgid "High value cannot be set above 100: %s\n" msgstr "Hoge waarde kan niet worden ingesteld boven 100: %s\n" -#: src/dotfile.c:263 +#: src/dotfile.c:262 #, c-format msgid "Wrong symbol value: %s\n" msgstr "Onjuiste waarde voor symbool %s\n" -#: src/dotfile.c:344 +#: src/dotfile.c:315 #, c-format msgid "Wrong csv separator: %s\n" msgstr "Onjuist csv scheidingsteken: %s\n" -#: src/dotfile.c:349 +#: src/dotfile.c:320 #, c-format msgid "Error: unknown option in configuration file: %s\n" msgstr "Fout: onbekende optie in configuratiebestand: %s\n" -#: src/dotfile.c:358 +#: src/dotfile.c:328 #, c-format -msgid "Unknown boolean value: %s\n" -msgstr "Onbekende booleanwaarde: %s\n" +msgid "Unknown boolean value for '%s': %s\n" +msgstr "Onbekende booleanwaarde voor '%s': %s\n" -#: src/dotfile.c:363 +#: src/dotfile.c:332 #, c-format -msgid "Unknown color value: %s\n" -msgstr "Onbekende kleurwaarde: %s\n" +msgid "Unknown color value for '%s': %s\n" +msgstr "Onbekende kleurwaarde vor '%s': %s\n" -#: src/dotfile.c:368 +#: src/dotfile.c:336 #, c-format -msgid "Not a valid HTML color: %s\n" -msgstr "Ongeldige HTML kleurcode: %s\n" +msgid "Not a valid HTML color for '%s': %s\n" +msgstr "Ongeldige HTML kleurcode voor '%s': %s\n" -#: src/dotfile.c:373 +#: src/dotfile.c:340 #, c-format -msgid "Could not assign value from configuration file: %s\n" -msgstr "Kan geen waarde lezen uit configuratiebestand: %s\n" +msgid "Cannot assign value for '%s': %s\n" +msgstr "Kan geen waarde voor '%s' toewijzen: %s\n" -#: src/util.c:509 src/export/html.c:157 src/export/tex.c:140 +#: src/util.c:510 src/export/html.c:157 src/export/tex.c:140 #: src/export/text.c:101 msgid "FILESYSTEM" msgstr "BEST.SYS." -#: src/util.c:510 src/export/html.c:160 src/export/tex.c:142 +#: src/util.c:511 src/export/html.c:160 src/export/tex.c:142 #: src/export/text.c:104 msgid "TYPE" msgstr "TYPE" -#: src/util.c:512 src/export/html.c:164 src/export/text.c:114 +#: src/util.c:513 src/export/html.c:164 src/export/text.c:114 msgid "%USED" msgstr "%GEBR" -#: src/util.c:513 src/export/html.c:166 src/export/tex.c:147 +#: src/util.c:514 src/export/html.c:166 src/export/tex.c:147 #: src/export/text.c:117 msgid "USED" msgstr "GEBR" -#: src/util.c:514 src/export/html.c:167 src/export/tex.c:148 +#: src/util.c:515 src/export/html.c:167 src/export/tex.c:148 #: src/export/text.c:119 msgid "AVAILABLE" msgstr "BESCH." -#: src/util.c:515 src/export/csv.c:104 src/export/html.c:168 +#: src/util.c:516 src/export/csv.c:104 src/export/html.c:168 #: src/export/tex.c:149 src/export/text.c:120 #, c-format msgid "TOTAL" msgstr "TOT." -#: src/util.c:516 src/export/html.c:171 src/export/text.c:123 +#: src/util.c:517 src/export/html.c:171 src/export/text.c:123 msgid "#INODES" msgstr "#INODES" -#: src/util.c:517 src/export/csv.c:108 src/export/html.c:172 +#: src/util.c:518 src/export/csv.c:108 src/export/html.c:172 #: src/export/text.c:124 #, c-format msgid "AV.INODES" msgstr "BB.INODES" -#: src/util.c:518 src/export/csv.c:112 src/export/html.c:176 +#: src/util.c:519 src/export/csv.c:112 src/export/html.c:176 #: src/export/tex.c:155 src/export/text.c:131 msgid "MOUNTED ON" msgstr "MOUNT" -#: src/util.c:519 src/export/html.c:179 src/export/tex.c:157 +#: src/util.c:520 src/export/html.c:179 src/export/tex.c:157 #: src/export/text.c:134 msgid "MOUNT OPTIONS" msgstr "MOUNT OPTIES" -#: src/util.c:544 +#: src/util.c:545 msgid "Cannot compute required width\n" msgstr "Kan vereiste breedte niet berekenen\n" -#: src/util.c:620 +#: src/util.c:621 msgid "" "WARNING: TTY too narrow. Some options have been disabled to make dfc output " "fit (use -f to override).\n" @@ -248,7 +248,7 @@ "WAARSCHUWING: TTY te smal. Sommige opties zijn uitgeschakeld om dfc output " "te laten passen (gebruik -f om te overschrijven).\n" -#: src/util.c:666 +#: src/util.c:667 msgid "WARNING: Output still messed up. Enlarge your terminal if you can...\n" msgstr "" "WAARSCHUWING: Output nog steeds te breed. Probeer uw terminal te\n" @@ -331,12 +331,12 @@ msgid "SUM:" msgstr "TOTAAL:" -#: src/platform/services-bsd.c:350 +#: src/platform/services-bsd.c:353 #, c-format msgid "Could not retrieve mount flags for %s\n" msgstr "Kan mount flags niet ontvangen voor %s\n" -#: src/platform/services-bsd.c:379 +#: src/platform/services-bsd.c:382 #, c-format msgid "Truncating mount options for %s\n" msgstr "Mount opties inkorten voor %s\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/dfc.c new/dfc-3.1.1/src/dfc.c --- old/dfc-3.1.0/src/dfc.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/dfc.c 2017-09-09 09:11:03.000000000 +0200 @@ -544,11 +544,11 @@ } /* filtering on fs type */ - if (tflag && (fsfilter(p->fstype, fstfilter, nmt) == 0)) { + if (tflag && (fsfilter(p->fstypeog, fstfilter, nmt) == 0)) { continue; } /* filtering on fs name */ - if (pflag && (fsfilter(p->fsname, fsnfilter, nmn) == 0)) { + if (pflag && (fsfilter(p->fsnameog, fsnfilter, nmn) == 0)) { continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/dotfile.c new/dfc-3.1.1/src/dotfile.c --- old/dfc-3.1.0/src/dotfile.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/dotfile.c 2017-09-09 09:11:03.000000000 +0200 @@ -186,7 +186,6 @@ { int tmp; int ret = 0; - char *tmpc = NULL; if (strcmp(key, "bold_font") == 0) { if ((tmp = get_boolean_value(val)) == -1) @@ -265,78 +264,50 @@ ret = -1; } } else if (strcmp(key, "html_color_header_bg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hcheadbg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hcheadbg, sizeof(cnf.hcheadbg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_header_fg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hcheadfg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hcheadfg, sizeof(cnf.hcheadfg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_cell_bg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hccellbg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hccellbg, sizeof(cnf.hccellbg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_cell_fg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hccellfg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hccellfg, sizeof(cnf.hccellfg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_hover_bg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hchoverbg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hchoverbg, sizeof(cnf.hchoverbg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_hover_fg") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hchoverfg = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hchoverfg, sizeof(cnf.hchoverfg), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_low") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hclow = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hclow, sizeof(cnf.hclow), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_medium") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hcmedium = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; - + if (snprintf(cnf.hcmedium, sizeof(cnf.hcmedium), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "html_color_high") == 0) { - if (chk_html_colorcode(val) == 0) { - if (!(tmpc = strdup(val))) - goto strdup_failed; - else - cnf.hchigh = tmpc; - } else + if (chk_html_colorcode(val) != 0) goto non_valid_html_color; + if (snprintf(cnf.hchigh, sizeof(cnf.hchigh), "%s", val) != HEXCOLOR_LEN) + goto assignment_failed; } else if (strcmp(key, "csv_separator") == 0) { if (strlen(val) == 1) cnf.csvsep = val[0]; @@ -351,33 +322,27 @@ ret = -1; } - free(tmpc); return ret; unknown_boolean_value: - (void)fprintf(stderr, _("Unknown boolean value: %s\n"), val); - free(tmpc); + (void)fprintf(stderr, _("Unknown boolean value for '%s': %s\n"), key, val); return -1; unknown_color_value: - (void)fprintf(stderr, _("Unknown color value: %s\n"), val); - free(tmpc); + (void)fprintf(stderr, _("Unknown color value for '%s': %s\n"), key, val); return -1; non_valid_html_color: - (void)fprintf(stderr, _("Not a valid HTML color: %s\n"), val); - free(tmpc); + (void)fprintf(stderr, _("Not a valid HTML color for '%s': %s\n"), key, val); return -1; -strdup_failed: - (void)fprintf(stderr, _("Could not assign value from configuration " - "file: %s\n"), val); - free(tmpc); +assignment_failed: + (void)fprintf(stderr, _("Cannot assign value for '%s': %s\n"), key, val); return -1; } -/* - * init a conf structure +/** + * Init a conf structure with default valuues. * @cnf: structure to be initiated */ void @@ -393,15 +358,15 @@ config->gsymbol = '='; - config->hcheadbg = "970000"; - config->hcheadfg = "FFFFFF"; - config->hccellbg = "E9E9E9"; - config->hccellfg = "000000"; - config->hchoverbg = "FFFFFF"; - config->hchoverfg = "000000"; - config->hclow = "348017"; - config->hcmedium = "FDD017"; - config->hchigh = "F62217"; + (void)snprintf(config->hcheadbg, sizeof(config->hcheadbg), "%s", "970000"); + (void)snprintf(config->hcheadfg, sizeof(config->hcheadfg), "%s", "FFFFFF"); + (void)snprintf(config->hccellbg, sizeof(config->hccellbg), "%s", "E9E9E9"); + (void)snprintf(config->hccellfg, sizeof(config->hccellfg), "%s", "000000"); + (void)snprintf(config->hchoverbg, sizeof(config->hchoverbg), "%s", "FFFFFF"); + (void)snprintf(config->hchoverfg, sizeof(config->hchoverfg), "%s", "000000"); + (void)snprintf(config->hclow, sizeof(config->hclow), "%s", "348017"); + (void)snprintf(config->hcmedium, sizeof(config->hcmedium), "%s", "FDD017"); + (void)snprintf(config->hchigh, sizeof(config->hchigh), "%s", "F62217"); config->csvsep = ','; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/extern.h new/dfc-3.1.1/src/extern.h --- old/dfc-3.1.0/src/extern.h 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/extern.h 2017-09-09 09:11:03.000000000 +0200 @@ -70,8 +70,8 @@ #define GRAPHBAR_SHORT 22 #define GRAPHBAR_WIDE 52 -/* html color code length (type of #FF0000, etc.) without the # */ -#define HTMLCOLORCODELENGTH 6 +/* hexadecimal color code length (type of #FF0000, etc.) without the # */ +#define HEXCOLOR_LEN 6 struct conf { @@ -85,15 +85,15 @@ int gmedium; /* starting value from which usage is considered medium */ int ghigh; /* starting value from which usage is considered high */ - const char *hcheadbg; /* background color for header and footer (html) */ - const char *hcheadfg; /* font color used in header and footer (html) */ - const char *hccellbg; /* background color for cells (html) */ - const char *hccellfg; /* font color for cells (html) */ - const char *hchoverbg; /* background color on hover (html) */ - const char *hchoverfg; /* font color on hover (html) */ - const char *hclow; /* color when usage is low (html) */ - const char *hcmedium; /* color when usage is medium (html) */ - const char *hchigh; /* color when usage is high (html) */ + char hcheadbg[HEXCOLOR_LEN + 1]; /* background color for header and footer (html) */ + char hcheadfg[HEXCOLOR_LEN + 1]; /* font color used in header and footer (html) */ + char hccellbg[HEXCOLOR_LEN + 1]; /* background color for cells (html) */ + char hccellfg[HEXCOLOR_LEN + 1]; /* font color for cells (html) */ + char hchoverbg[HEXCOLOR_LEN + 1]; /* background color on hover (html) */ + char hchoverfg[HEXCOLOR_LEN + 1]; /* font color on hover (html) */ + char hclow[HEXCOLOR_LEN + 1]; /* color when usage is low (html) */ + char hcmedium[HEXCOLOR_LEN + 1]; /* color when usage is medium (html) */ + char hchigh[HEXCOLOR_LEN + 1]; /* color when usage is high (html) */ char gsymbol; /* symbol used to draw the graph */ char csvsep; /* separator used for csv export */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/list.c new/dfc-3.1.1/src/list.c --- old/dfc-3.1.0/src/list.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/list.c 2017-09-09 09:11:03.000000000 +0200 @@ -109,8 +109,11 @@ struct fsmntinfo fmi; fmi.fsname = g_unknown_str; + fmi.fsnameog = g_unknown_str; fmi.fstype = g_unknown_str; + fmi.fstypeog = g_unknown_str; fmi.mntdir = g_unknown_str; + fmi.mntdirog = g_unknown_str; fmi.mntopts = g_none_str; fmi.perctused = 0.0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/list.h new/dfc-3.1.1/src/list.h --- old/dfc-3.1.0/src/list.h 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/list.h 2017-09-09 09:11:03.000000000 +0200 @@ -45,8 +45,11 @@ struct fsmntinfo { /* infos to get from getmntent(3) */ char *fsname; /* name of mounted file system */ + char *fsnameog; /* original name of file system */ char *fstype; /* mount type */ + char *fstypeog; /* original mount type */ char *mntdir; /* file system path prefix */ + char *mntdirog; /* original file system path prefix */ char *mntopts; /* mount options (see mntent.h) */ double perctused; /* fs usage in % */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/platform/services-bsd.c new/dfc-3.1.1/src/platform/services-bsd.c --- old/dfc-3.1.0/src/platform/services-bsd.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/platform/services-bsd.c 2017-09-09 09:11:03.000000000 +0200 @@ -121,13 +121,16 @@ for (fs = &entbuf; nummnt--; (*fs)++) { vfsbuf = **fs; + if ((fmi->fsnameog = strdup(entbuf->f_mntfromname)) == NULL) + fmi->fsnameog = g_unknown_str; + if ((fmi->mntdirog = strdup(entbuf->f_mntonname)) == NULL) + fmi->mntdirog = g_unknown_str; + if ((fmi->fstypeog = strdup(entbuf->f_fstypename)) == NULL) + fmi->fstypeog = g_unknown_str; if (Wflag) { /* Wflag to avoid name truncation */ - if ((fmi->fsname = strdup(entbuf->f_mntfromname)) == NULL) - fmi->fsname = g_unknown_str; - if ((fmi->mntdir = strdup(entbuf->f_mntonname)) == NULL) - fmi->mntdir = g_unknown_str; - if ((fmi->fstype = strdup(entbuf->f_fstypename)) == NULL) - fmi->fstype = g_unknown_str; + fmi->fsname = fmi->fsnameog; + fmi->mntdir = fmi->mntdirog; + fmi->fstype = fmi->fstypeog; } else { if ((fmi->fsname = strdup(shortenstr( entbuf->f_mntfromname, STRMAXLEN))) == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/platform/services-linux.c new/dfc-3.1.1/src/platform/services-linux.c --- old/dfc-3.1.0/src/platform/services-linux.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/platform/services-linux.c 2017-09-09 09:11:03.000000000 +0200 @@ -114,13 +114,16 @@ continue; } /* infos from getmntent */ + if ((fmi->fsnameog = strdup(entbuf->mnt_fsname)) == NULL) + fmi->fsnameog = g_unknown_str; + if ((fmi->mntdirog = strdup(entbuf->mnt_dir)) == NULL) + fmi->mntdirog = g_unknown_str; + if ((fmi->fstypeog = strdup(entbuf->mnt_type)) == NULL) + fmi->fstypeog = g_unknown_str; if (Wflag) { /* Wflag to avoid name truncation */ - if ((fmi->fsname = strdup(entbuf->mnt_fsname)) == NULL) - fmi->fsname = g_unknown_str; - if ((fmi->mntdir = strdup(entbuf->mnt_dir)) == NULL) - fmi->mntdir = g_unknown_str; - if ((fmi->fstype = strdup(entbuf->mnt_type)) == NULL) - fmi->fstype = g_unknown_str; + fmi->fsname = fmi->fsnameog; + fmi->mntdir = fmi->mntdirog; + fmi->fstype = fmi->fstypeog; } else { if ((fmi->fsname = strdup(shortenstr( entbuf->mnt_fsname, STRMAXLEN))) == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/platform/services-solaris.c new/dfc-3.1.1/src/platform/services-solaris.c --- old/dfc-3.1.0/src/platform/services-solaris.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/platform/services-solaris.c 2017-09-09 09:11:03.000000000 +0200 @@ -110,13 +110,16 @@ perror(" "); continue; } + if ((fmi->fsnameog = strdup(mnttabbuf.mnt_special)) == NULL) + fmi->fsnameog = g_unknown_str; + if ((fmi->mntdirog = strdup(mnttabbuf.mnt_mountp))== NULL) + fmi->mntdirog = g_unknown_str; + if ((fmi->fstypeog = strdup(mnttabbuf.mnt_fstype)) == NULL) + fmi->fstypeog = g_unknown_str; if (Wflag) { /* Wflag to avoid name truncation */ - if ((fmi->fsname = strdup(mnttabbuf.mnt_special)) == NULL) - fmi->fsname = g_unknown_str; - if ((fmi->mntdir = strdup(mnttabbuf.mnt_mountp))== NULL) - fmi->mntdir = g_unknown_str; - if ((fmi->fstype = strdup(mnttabbuf.mnt_fstype)) == NULL) - fmi->fstype = g_unknown_str; + fmi->fsname = fmi->fsnameog; + fmi->mntdir = fmi->mntdirog; + fmi->fstype = fmi->fstypeog; } else { if ((fmi->fsname = strdup(shortenstr( mnttabbuf.mnt_special, STRMAXLEN))) == NULL) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dfc-3.1.0/src/util.c new/dfc-3.1.1/src/util.c --- old/dfc-3.1.0/src/util.c 2017-04-09 11:36:02.000000000 +0200 +++ new/dfc-3.1.1/src/util.c 2017-09-09 09:11:03.000000000 +0200 @@ -261,6 +261,7 @@ default: (void)fputs("Could not print unit type in" " human-readable format\n", stderr); + return; } case 'b': if (mode) @@ -731,29 +732,29 @@ int colortoint(const char *col) { - if (strcoll(col, "black") == 0) + if (strcmp(col, "black") == 0) return BLACK; - else if (strcoll(col, "red") == 0) + else if (strcmp(col, "red") == 0) return RED; - else if (strcoll(col, "green") == 0) + else if (strcmp(col, "green") == 0) return GREEN; - else if (strcoll(col, "yellow") == 0) + else if (strcmp(col, "yellow") == 0) return YELLOW; - else if (strcoll(col, "blue") == 0) + else if (strcmp(col, "blue") == 0) return BLUE; - else if (strcoll(col, "magenta") == 0) + else if (strcmp(col, "magenta") == 0) return MAGENTA; - else if (strcoll(col, "cyan") == 0) + else if (strcmp(col, "cyan") == 0) return CYAN; - else if (strcoll(col, "white") == 0) + else if (strcmp(col, "white") == 0) return WHITE; else return -1; } /* - * check if the input string is a valid html color code. - * ie: it should be an hexadecimal value + * Check if the input string is a valid hexadecimal color code. + * ie: it should be a HEXCOLOR_LEN long hexadecimal value. * Returns 0 if all went well, otherwise it returns -1 * @color: input color * NOTE: color should omit the #: white is FFFFFF and not #FFFFFF @@ -763,10 +764,10 @@ { int i; - if (strlen(color) != HTMLCOLORCODELENGTH) + if (strlen(color) != HEXCOLOR_LEN) return -1; - for (i = 0; i < HTMLCOLORCODELENGTH; i++) + for (i = 0; i < HEXCOLOR_LEN; i++) if (isxdigit(color[i]) == 0) return -1;
