lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RESEND PATCH v3 1/2] VT: Add KDFONTINFO ioctl
From
On 02. 04. 24, 15:19, Alexey Gladkov wrote:
>>> --- a/include/uapi/linux/kd.h
>>> +++ b/include/uapi/linux/kd.h
..
>>> +struct console_font_info {
>>> + unsigned int min_width, min_height; /* minimal font size */
>>> + unsigned int max_width, max_height; /* maximum font size */
>>> + unsigned int flags; /* KD_FONT_INFO_FLAG_* */
>>
>> This does not look like a well-defined™ and extendable uapi structure.
>> While it won't change anything here, still use fixed-length __u32.
>>
>> And you should perhaps add some reserved fields. Do not repeat the same
>> mistakes as your predecessors with the current kd uapi.
>
> I thought about it, but I thought it would be overengineering.

It would not. UAPI structs are set in stone once released.

And in this case, it's likely you would want to know more info about
fonts in the future.

> Can you suggest how best to do this?

Given you have flags in there already (to state that the structure
contains more), just add an array of u32 reserved[] space. 3 or 5, I
would say (to align the struct to 64bit).

thanks,
--
js
suse labs


\
 
 \ /
  Last update: 2024-05-27 16:20    [W:0.161 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site