@@ -237,27 +237,26 @@ FF_MAYBE_UNUSED static bool detectDebianDerived(FFOSResult* result)
237
237
if (ffPathExists ("/boot/dietpi/.version" , FF_PATHTYPE_FILE ))
238
238
{
239
239
// DietPi
240
- ffStrbufSetS (& result -> id , "dietpi" );
241
- ffStrbufSetS (& result -> name , "DietPi" );
242
- ffStrbufClear (& result -> version );
240
+ ffStrbufSetStatic (& result -> id , "dietpi" );
241
+ ffStrbufSetStatic (& result -> name , "DietPi" );
242
+ ffStrbufSetStatic (& result -> prettyName , "DietPi" );
243
+ FF_STRBUF_AUTO_DESTROY core = ffStrbufCreate ();
243
244
FF_STRBUF_AUTO_DESTROY sub = ffStrbufCreate ();
244
245
FF_STRBUF_AUTO_DESTROY rc = ffStrbufCreate ();
245
246
if (ffParsePropFileValues ("/boot/dietpi/.version" , 3 , (FFpropquery []) {
246
- {"G_DIETPI_VERSION_CORE=" , & result -> version },
247
+ {"G_DIETPI_VERSION_CORE=" , & core },
247
248
{"G_DIETPI_VERSION_SUB=" , & sub },
248
249
{"G_DIETPI_VERSION_RC=" , & rc },
249
- })) ffStrbufAppendF (& result -> version , ".%s.%s" , sub .chars , rc .chars );
250
- ffStrbufSet (& result -> versionID , & result -> version );
251
- ffStrbufSetF (& result -> prettyName , "DietPi %s" , result -> version .chars );
250
+ })) ffStrbufAppendF (& result -> prettyName , " %s.%s.%s" , core .chars , sub .chars , rc .chars );
252
251
}
253
252
else
254
253
{
255
254
// Raspberry Pi OS
256
- ffStrbufSetS (& result -> id , "raspbian" );
257
- ffStrbufSetS (& result -> name , "Raspberry Pi OS" );
258
- ffStrbufSetS (& result -> prettyName , "Raspberry Pi OS" );
259
- return true;
255
+ ffStrbufSetStatic (& result -> id , "raspbian" );
256
+ ffStrbufSetStatic (& result -> name , "Raspberry Pi OS" );
257
+ ffStrbufSetStatic (& result -> prettyName , "Raspberry Pi OS" );
260
258
}
259
+ return true;
261
260
}
262
261
else if (ffStrbufEndsWithS (& instance .state .platform .sysinfo .release , "+truenas" ))
263
262
{
0 commit comments