validatetmpfs() {
# Validate the TMPFS directory. If SM_USETMPFS is set to 1 and SM_TMPFSDIR variable is set, then check for 
  # genuineness of the TMPFS directory. If it fails, declare a variable for the build summary.
  if [ "$SM_USETMPFS" = "1" ] && [ -n "$SM_TMPFSDIR" ]; then
    if [ ! -d "$SM_TMPFSDIR" ] || [ ! -w "$SM_TMPFSDIR" ] \
    || [ "$(findmnt -no TARGET $SM_TMPFSDIR)" != "$SM_TMPFSDIR" ] \
    || [ "$(findmnt -no FSTYPE $SM_TMPFSDIR)" != "tmpfs" ]; then
       SM_TMPFSCHECKFAILED=1
    fi
  fi
}
