@@ -143,7 +143,7 @@ static void getDebianVersion(FFOSResult* result)
143143 ffStrbufSet (& result -> versionID , & debianVersion );
144144}
145145
146- static void detectDebianDerived (FFOSResult * result )
146+ static bool detectDebianDerived (FFOSResult * result )
147147{
148148 if (ffStrbufStartsWithS (& result -> prettyName , "Armbian " )) // Armbian 24.2.1 bookworm
149149 {
@@ -154,6 +154,7 @@ static void detectDebianDerived(FFOSResult* result)
154154 uint32_t versionStart = ffStrbufFirstIndexC (& result -> prettyName , ' ' ) + 1 ;
155155 uint32_t versionEnd = ffStrbufNextIndexC (& result -> prettyName , versionStart , ' ' );
156156 ffStrbufSetNS (& result -> versionID , versionEnd - versionStart , result -> prettyName .chars + versionStart );
157+ return true;
157158 }
158159 else if (ffPathExists ("/usr/bin/pveversion" , FF_PATHTYPE_FILE ))
159160 {
@@ -170,7 +171,9 @@ static void detectDebianDerived(FFOSResult* result)
170171 ffStrbufSubstrAfterFirstC (& result -> versionID , '/' );
171172 }
172173 ffStrbufSetF (& result -> prettyName , "Proxmox VE %s" , result -> versionID .chars );
174+ return true;
173175 }
176+ return false;
174177}
175178
176179static void detectOS (FFOSResult * os )
@@ -227,7 +230,7 @@ void ffDetectOSImpl(FFOSResult* os)
227230 getUbuntuFlavour (os );
228231 else if (ffStrbufIgnCaseEqualS (& os -> id , "debian" ))
229232 {
230- detectDebianDerived (os );
231- getDebianVersion (os );
233+ if (! detectDebianDerived (os ))
234+ getDebianVersion (os );
232235 }
233236}
0 commit comments