1.修复sd卡用量不准问题
This commit is contained in:
parent
0e77596362
commit
efe4488672
|
@ -50,7 +50,7 @@ my_mount()
|
|||
mkdir -p "${MNT_PATH}/${MNT_DIR}" || exit 1
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
exit 1
|
||||
fi
|
||||
|
@ -209,7 +209,7 @@ if [ -z $DEVPATH ]; then
|
|||
# Inserted but can't be mounted
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
continue
|
||||
fi
|
||||
|
|
|
@ -50,7 +50,7 @@ my_mount()
|
|||
mkdir -p "${MNT_PATH}/${MNT_DIR}" || exit 1
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
exit 1
|
||||
fi
|
||||
|
@ -209,7 +209,7 @@ if [ -z $DEVPATH ]; then
|
|||
# Inserted but can't be mounted
|
||||
fat_type=`blkid "$MOUNTDEV" | awk -F'TYPE=' '{print $NF}'`
|
||||
if [ "${fat_type}" == "\"vfat\"" ]; then
|
||||
if ! mount -o usefree,dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
if ! mount -o dirsync,time_offset=$time_offset_total_m "$MOUNTDEV" "${MNT_PATH}/${MNT_DIR}" 2>&1 | tee -a /tmp/mountstat; then
|
||||
echo "$MOUNTDEV $MNT_PATH/$MNT_DIR ignore defaults 0 0" >> /tmp/.nvt_mounts
|
||||
continue
|
||||
fi
|
||||
|
|
|
@ -556,6 +556,8 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
//static SINT8 bsdstatus = 0;
|
||||
//static SINT8 bsdoutstatus = 0;
|
||||
UINT32 status;
|
||||
SINT16 startup = sf_poweron_type_get();
|
||||
|
||||
MLOGD("[%d,%s]\n",pMessageBuf->arg1,app_process_SD_getstatusstring(pMessageBuf->arg1));
|
||||
switch(pMessageBuf->arg1)
|
||||
{
|
||||
|
@ -579,6 +581,9 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
case FST_STA_OK:
|
||||
sf_set_card(1);
|
||||
sf_sd_status_set(SF_SD_OK);
|
||||
|
||||
if(SF_MCU_STARTUP_ONKEY == startup)
|
||||
{
|
||||
SF_STORE_ATTR_S storeattrs = {0};
|
||||
sf_sd_info_get(&storeattrs);
|
||||
printf("SD free=%dM/%dM\n", storeattrs.SDFree, storeattrs.SDTotalSize);
|
||||
|
@ -590,6 +595,8 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
{
|
||||
sf_sys_status_led_set(SF_LED_SYS_STATE_SD_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
sf_statistics_param_load(sf_statistics_param_get());
|
||||
MLOGI("card-%d mount OK\r\n", pMessageBuf->arg2 + 1);
|
||||
sf_set_key_fw_update(sf_get_fw_update());
|
||||
|
|
Loading…
Reference in New Issue
Block a user