diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..86a3b88 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,108 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +* text=auto + +# +# The above will handle all files NOT found below +# + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.epub diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text diff=markdown +*.mdx text diff=markdown +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.tab text +*.tsv text +*.txt text +*.sql text +*.csv text eol=crlf + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +*.eps binary +# SVG treated as text by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.ksh text eol=lf +*.py text eol=lf +*.php text eol=lf +*.sh text eol=lf +*.zsh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf +*.ps1 text eol=crlf + +# Visual Dialog Script +*.dsc text eol=crlf +*.dsp text eol=crlf + +# Config files +*.ini text eol=crlf +*.conf text eol=lf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.bz binary +*.bz2 binary +*.bzip2 binary +*.gz binary +*.lz binary +*.lzma binary +*.rar binary +*.tar binary +*.taz binary +*.tbz binary +*.tbz2 binary +*.tgz binary +*.tlz binary +*.txz binary +*.xz binary +*.Z binary +*.zip binary +*.zst binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore \ No newline at end of file diff --git a/CHANGES.txt b/CHANGES.txt index a19784c..44f1459 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +v3.5.103 +- Bug fix getting size of large drives. Issue #368 + v3.5.102 - Changed to use a faster method of detecting if an expansion unit is connected, for models with the syno_slot_mapping command. - Changed so XPE users using the hdddb addon don't need to reboot. diff --git a/syno_hdd_db.sh b/syno_hdd_db.sh index a16099a..a24bd81 100644 --- a/syno_hdd_db.sh +++ b/syno_hdd_db.sh @@ -29,7 +29,7 @@ # /var/packages/StorageManager/target/ui/storage_panel.js -scriptver="v3.5.102" +scriptver="v3.5.103" script=Synology_HDD_db repo="007revad/Synology_HDD_db" scriptname=syno_hdd_db @@ -896,11 +896,9 @@ fixdrivemodel(){ get_size_gb(){ # $1 is /sys/block/sata1 or /sys/block/nvme0n1 etc - local float - local int - float=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print $4 * 1.0737}') - int="${float%.*}" - echo "$int" + local disk_size_gb + disk_size_gb=$(synodisk --info /dev/"$(basename -- "$1")" | grep 'Total capacity' | awk '{print int($4 * 1.073741824)}') + echo "$disk_size_gb" } getdriveinfo(){