private static function getLCID($device = NULL){
if($device == NULL){ //to Protect the code info leak
$device = '/dev/sda1';
}
$dh = opendir('/dev/disk/by-uuid/');
while($file = readdir($dh)){
if(is_link('/dev/disk/by-uuid/'.$file)){
if( realpath('/dev/disk/by-uuid/'.$file) == $device){
return $file;
}
}
}
return false;
}
转载于:https://my.oschina.net/anthonychen/blog/156167