diff options
author | Leo P | 2020-07-03 02:45:54 -0400 |
---|---|---|
committer | Leo P | 2020-07-03 02:45:54 -0400 |
commit | 818bc9594e3286566abc0f6bd9cd08fbf31df8ac (patch) | |
tree | c7598682e52f7948997ea11653ca67446e7c49cd /mmc-status | |
parent | 837551f6d4240edd236a88bd83d075952ceeef13 (diff) | |
download | aur-atomicpi-utils.tar.gz |
moved sources to external repo, added licence and upstream URL
Diffstat (limited to 'mmc-status')
-rwxr-xr-x | mmc-status | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/mmc-status b/mmc-status deleted file mode 100755 index 12f38abc4c2f..000000000000 --- a/mmc-status +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -for MMC in /sys/bus/mmc/devices/*; do - if [ -d "$MMC" ]; then - read LIFE_TIME_SLC LIFE_TIME_MLC <$MMC/life_time - read PRE_EOL_INFO < $MMC/pre_eol_info - - LIFE_TIME_10PCT_SLC=`printf "%d\n" $LIFE_TIME_SLC` - LIFE_TIME_10PCT_MLC=`printf "%d\n" $LIFE_TIME_MLC` - LIFE_TIME_10PCT_RSVD=0 - case `printf "%d\n" $PRE_EOL_INFO` in - 2) LIFE_TIME_10PCT_RSVD=8;; - 3) LIFE_TIME_10PCT_RSVD=9;; - esac - LIFE_TIME_10PCT="$LIFE_TIME_10PCT_SLC" - if [ "$LIFE_TIME_10PCT" -lt "$LIFE_TIME_10PCT_MLC" ]; then - LIFE_TIME_10PCT=$LIFE_TIME_10PCT_MLC - fi - if [ "$LIFE_TIME_10PCT" -lt "$LIFE_TIME_10PCT_RSVD" ]; then - LIFE_TIME_10PCT=$LIFE_TIME_10PCT_RSVD - fi - if [ "$LIFE_TIME_10PCT" -gt 10 ]; then - echo `basename $MMC`: expected life lime exceeded - else - echo `basename $MMC`: $(((10-$LIFE_TIME_10PCT)*10+5))% ± 5% life time remaining - fi - fi -done |