adopt newer debian #35
@ -294,7 +294,7 @@ void reHDD::searchDrives(list <Drive>* plistDrives)
 | 
			
		||||
    char * cLine = NULL;
 | 
			
		||||
    size_t len = 0;
 | 
			
		||||
 | 
			
		||||
    FILE* outputfileHwinfo = popen("ls -1 /dev/sd*", "r");
 | 
			
		||||
    FILE* outputfileHwinfo = popen("lsblk -I 8 -d -o NAME", "r");
 | 
			
		||||
 | 
			
		||||
    if (outputfileHwinfo == NULL)
 | 
			
		||||
        {
 | 
			
		||||
@ -304,13 +304,13 @@ void reHDD::searchDrives(list <Drive>* plistDrives)
 | 
			
		||||
 | 
			
		||||
    while ((getline(&cLine, &len, outputfileHwinfo)) != -1)
 | 
			
		||||
        {
 | 
			
		||||
            if (string(cLine).length() == 9)
 | 
			
		||||
            if (string(cLine).length() == 4)
 | 
			
		||||
                {
 | 
			
		||||
                    Drive* tmpDrive = new Drive(string(cLine).substr(0, 8));
 | 
			
		||||
                    Drive* tmpDrive = new Drive("/dev/" + string(cLine).substr(0, 3));
 | 
			
		||||
                    tmpDrive->state = Drive::NONE;
 | 
			
		||||
                    tmpDrive->bIsOffline = false;
 | 
			
		||||
                    plistDrives->push_back(*tmpDrive);
 | 
			
		||||
                    Logger::logThis()->info("search drives: " + tmpDrive->getPath());
 | 
			
		||||
                    Logger::logThis()->info("drive found: " + tmpDrive->getPath());
 | 
			
		||||
                }
 | 
			
		||||
        }
 | 
			
		||||
    fclose(outputfileHwinfo);
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user