Ticket #6589: mythtv-6589-backend_status-move_total_disk_space_to_top.patch
File mythtv-6589-backend_status-move_total_disk_space_to_top.patch, 1.2 KB (added by , 15 years ago) |
---|
-
programs/mythbackend/httpstatus.cpp
old new 339 339 BackendQueryDiskSpace(strlist, m_pEncoders, true, m_bIsMaster); 340 340 QDomElement total; 341 341 342 // Make a temporary list to hold the per-filesystem elements so that the 343 // total is always the first element. 344 QList<QDomElement> fsXML; 342 345 QStringList::const_iterator sit = strlist.begin(); 343 346 while (sit != strlist.end()) 344 347 { … … 362 365 group.setAttribute("free" , (int)(iAvail>>10) ); 363 366 group.setAttribute("dir" , directory ); 364 367 365 // Make sure that the total is always the last element.366 368 if (fsID == "total") 367 369 total = group; 368 370 else 369 storage.appendChild(group);371 fsXML << group; 370 372 } 371 373 372 374 storage.appendChild(total); 375 int num_elements = fsXML.size(); 376 for (int fs_index = 0; fs_index < num_elements; fs_index++) 377 { 378 storage.appendChild(fsXML[fs_index]); 379 } 373 380 374 381 // load average --------------------- 375 382