-
rzezeskiIs there a reason we don't support the alternate form (#) flag in kernel printf?
-
rmustaccrzezeski: No particular reason. Probably just need.
-
rmustaccWe can add it and teach gcc about the support for it.
-
rzezeskik, I ask because the Chelsio common code uses it in some places. I can just update those places for now, but would be nice to have that support. I'll create an issue.
-
rzezeskifenix illumos#17614
-
fenixFEATURE 17614: add support for alternate form flag in kernel printf (New)
-
fenix
-
richlowe#17586 (fenix?) is another similar case that bit me recently
-
fenixFEATURE 17586: mdb_printf should support %z (New)
-
fenix
-
richloweif someone brave wanted to commonize our doprnts
-
jbki have a from scratch *printf implementation.. though it doesn't support the i18n bits
-
jbki ended up writing it for some UEFI stuff
-
jbkbut i borrowed the idea (definitely not the code) from ast where there's a struct that represents a conversion specification
-
jbkso each one gets parsed, then the struct is used to do the work
-
jbkit made it cleaner and easier to follow (IMO at least)
-
rmustaccJust make sure there's ample test suite investment here given the high blast radius.