aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/fbset.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index 2a959c21c..b41612dc8 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -131,10 +131,10 @@ struct fb_var_screeninfo {
131}; 131};
132 132
133 133
134static struct cmdoptions_t { 134const static struct cmdoptions_t {
135 char *name; 135 const char *name;
136 unsigned char param_count; 136 const unsigned char param_count;
137 unsigned char code; 137 const unsigned char code;
138} g_cmdoptions[] = { 138} g_cmdoptions[] = {
139 { 139 {
140 "-fb", 1, CMD_FB}, { 140 "-fb", 1, CMD_FB}, {
@@ -284,7 +284,7 @@ static int readmode(struct fb_var_screeninfo *base, const char *fn,
284 return 0; 284 return 0;
285} 285}
286 286
287static void setmode(struct fb_var_screeninfo *base, 287static inline void setmode(struct fb_var_screeninfo *base,
288 struct fb_var_screeninfo *set) 288 struct fb_var_screeninfo *set)
289{ 289{
290 if ((int) set->xres > 0) 290 if ((int) set->xres > 0)
@@ -299,7 +299,7 @@ static void setmode(struct fb_var_screeninfo *base,
299 base->bits_per_pixel = set->bits_per_pixel; 299 base->bits_per_pixel = set->bits_per_pixel;
300} 300}
301 301
302static void showmode(struct fb_var_screeninfo *v) 302static inline void showmode(struct fb_var_screeninfo *v)
303{ 303{
304 double drate = 0, hrate = 0, vrate = 0; 304 double drate = 0, hrate = 0, vrate = 0;
305 305
@@ -312,21 +312,21 @@ static void showmode(struct fb_var_screeninfo *v)
312 hrate / (v->upper_margin + v->yres + v->lower_margin + 312 hrate / (v->upper_margin + v->yres + v->lower_margin +
313 v->vsync_len); 313 v->vsync_len);
314 } 314 }
315 printf("\nmode \"%ux%u-%u\"\n", v->xres, v->yres, (int) (vrate + 0.5)); 315 printf("\nmode \"%ux%u-%u\"\n"
316#ifdef CONFIG_FEATURE_FBSET_FANCY 316#ifdef CONFIG_FEATURE_FBSET_FANCY
317 printf("\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n", drate / 1e6, 317 "\t# D: %.3f MHz, H: %.3f kHz, V: %.3f Hz\n"
318 hrate / 1e3, vrate);
319#endif 318#endif
320 printf("\tgeometry %u %u %u %u %u\n", v->xres, v->yres, 319 "\tgeometry %u %u %u %u %u\n\ttimings %u %u %u %u %u %u %u\n\taccel %s\n\trgba %u/%u,%u/%u,%u/%u,%u/%u\nendmode\n\n",
321 v->xres_virtual, v->yres_virtual, v->bits_per_pixel); 320 v->xres, v->yres, (int) (vrate + 0.5),
322 printf("\ttimings %u %u %u %u %u %u %u\n", v->pixclock, v->left_margin, 321#ifdef CONFIG_FEATURE_FBSET_FANCY
322 drate / 1e6, hrate / 1e3, vrate,
323#endif
324 v->xres, v->yres, v->xres_virtual, v->yres_virtual,
325 v->bits_per_pixel, v->pixclock, v->left_margin,
323 v->right_margin, v->upper_margin, v->lower_margin, v->hsync_len, 326 v->right_margin, v->upper_margin, v->lower_margin, v->hsync_len,
324 v->vsync_len); 327 v->vsync_len, (v->accel_flags > 0 ? "true" : "false"), v->red.length,
325 printf("\taccel %s\n", (v->accel_flags > 0 ? "true" : "false"));
326 printf("\trgba %u/%u,%u/%u,%u/%u,%u/%u\n", v->red.length,
327 v->red.offset, v->green.length, v->green.offset, v->blue.length, 328 v->red.offset, v->green.length, v->green.offset, v->blue.length,
328 v->blue.offset, v->transp.length, v->transp.offset); 329 v->blue.offset, v->transp.length, v->transp.offset);
329 printf("endmode\n\n");
330} 330}
331 331
332#ifdef STANDALONE 332#ifdef STANDALONE