2 * linux/drivers/video/fb_cmdline.c
4 * Copyright (C) 2014 Intel Corp
5 * Copyright (C) 1994 Martin Schaller
7 * 2001 - Documented with DocBook
10 * This file is subject to the terms and conditions of the GNU General Public
11 * License. See the file COPYING in the main directory of this archive
18 #include <linux/export.h>
20 #include <linux/string.h>
22 #include <video/cmdline.h>
25 * fb_get_options - get kernel boot parameters
26 * @name: framebuffer name as it would appear in
27 * the boot parameter line
28 * (video=<name>:<options>)
29 * @option: the option will be stored here
31 * The caller owns the string returned in @option and is
32 * responsible for releasing the memory.
34 * NOTE: Needed to maintain backwards compatibility
36 int fb_get_options(const char *name, char **option)
38 const char *options = NULL;
43 is_of = strncmp(name, "offb", 4);
45 enabled = __video_get_options(name, &options, is_of);
48 if (!strncmp(options, "off", 3))
54 *option = kstrdup(options, GFP_KERNEL);
59 return enabled ? 0 : 1; // 0 on success, 1 otherwise
61 EXPORT_SYMBOL(fb_get_options);