HDD format in Neutrino-MP

Entwicklung
Antworten
Benny
Interessierter
Interessierter
Beiträge: 57
Registriert: Samstag 17. Mai 2014, 18:28
Sonstiges: GM990

HDD format in Neutrino-MP

Beitrag von Benny »

Greetings,

ext3/4 HDD format failed, in logs looks like fdisk called with incorrect options. In neutrino-mp/src/gui/hdd_menu.cpp we have

Code: Alles auswählen

	fdisk   = find_executable("fdisk");
	sfdisk  = find_executable("sfdisk");
	mke3fs  = find_executable("mkfs.ext3");
	mke4fs  = find_executable("mkfs.ext4");
	tune2fs = find_executable("tune2fs");
	if (! fdisk.empty()) {                                                                     // should this look like 'if (! sfdisk.empty())'?
		snprintf(cmd, sizeof(cmd), "%s -f -uM /dev/%s", fdisk.c_str(), key.c_str()); // 'sfdisk.c_str()'?
		strcpy(cmd2, "0,\n;\n;\n;\ny\n");            // this branch failed, -f -M and further commands not valid for fdisk
	} else if (! fdisk.empty()) {
		snprintf(cmd, sizeof(cmd), "%s -u /dev/%s", fdisk.c_str(), key.c_str());
		strcpy(cmd2, "o\nn\np\n1\n2048\n\nw\n");
This is a typo?
PS Diff with fix attached
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
doc
Contributor
Beiträge: 1623
Registriert: Donnerstag 10. Januar 2002, 20:03

Re: HDD format in Neutrino-MP

Beitrag von doc »

Care to create a git patch directly instead "only" a diff? That would make life much easier for the people with commit rights. :wink:
Na schönen Dank Herr Schwanke!
Ein toller Sommer! :-(
martii
Einsteiger
Einsteiger
Beiträge: 217
Registriert: Donnerstag 14. Juni 2012, 09:39

Re: HDD format in Neutrino-MP

Beitrag von martii »

Benny hat geschrieben:PS Diff with fix attached
Applied, thanks!
Antworten