Re: Driver writer hints (was [PATCH 3/4] Add ETHTOOL_[GS]PFLAGS sub-ioctls)



Rick Jones wrote:
If we are getting (retrieving) flags:

3) Userland issues ETHTOOL_GPFLAGS, to obtain a 32-bit bitmap

4) Userland prints out a tag returned from ETHTOOL_GSTRINGS
for each bit set to one in the bitmap. If a bit is set,
but there is no string to describe it, that bit is ignored.
(i.e. a list of 5 strings is returned, but bit 24 is set)

Is that to enable "hidden" bits? If not I'd think that emitting some sort of "UNKNOWN_FLAG" might help flush-out little oopses like forgetting a string.

No purpose other than attempting to define sane edge case behavior.

The bitmap interface is completely invisible to the user (who sees UTF8 strings on the command line), and given the interface I felt the easiest thing to do would be to define an "ignore any garbage" default policy.

Due to the way the interface is designed, each userland user must be aware of the precise number of valid bits in the bitmap /anyway/, thus making clipping/ignoring garbage bits almost a trivial side effect.

Jeff



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [PATCH] bitmap parsing/printing routines, version 4
    ... This release of the bitmap parser/printer continues the cycle of making ... I gradually came to feel that examining the whole string was important, ... int bitmap_weight ... * and a length, describing the mask contents. ...
    (Linux-Kernel)
  • Re: seperator error in __mask_snprintf_len
    ... This patch captures what I am looking for in bitmap display and input. ... * bitmap_snprintf - convert bitmap to an ASCII hex string. ... * and a length, describing the mask contents. ...
    (Linux-Kernel)
  • Re: bitmaps in menus
    ... The string is defined by 203 value, ... How to use a bitmap instead of a string? ... BOOL ClsPFCommandBar::AddButton(int nID, LPCTSTR sBitMapName, int ... if (iButton == m_clsButtons.GetCount()) ...
    (microsoft.public.pocketpc.developer)
  • Re: Bitmaps as buttons?
    ... I see that you can use a string as a graphicspath which ... acts like a mask, but it still doesn't allow me to use a bitmap (i.e. ... use a string or draw the points of a shape). ... >> was any way of doing it besides drawing the bitmap shape, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Return a Bitmap as IPicture
    ... System.Drawing.Bitmap does not implement the OLE IPicture interface. ... have to create your own implementation of that interface to wrap the Bitmap ... I created a System.Drawing.Bitmap object and load it with MyBitmap.bmp ...
    (microsoft.public.dotnet.languages.csharp)