ALT Linux Bugzilla
– Attachment 1268 Details for
Bug 8574
[FR] add --setdrv patch
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
add --setdrv
x11setupdrv-writedriver.patch (text/plain), 1.62 KB, created by
Michael Shigorin
on 2005-11-29 19:27:32 MSK
(
hide
)
Description:
add --setdrv
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2005-11-29 19:27:32 MSK
Size:
1.62 KB
patch
obsolete
>--- x11setupdrv.c.orig 2005-08-08 19:10:50 +0300 >+++ x11setupdrv.c 2005-10-17 18:04:54 +0300 >@@ -45,6 +45,7 @@ > {"driver", no_argument, 0, 'd'}, > {"nosetup", no_argument, 0, 'n'}, > {"help", no_argument, 0, 'h'}, >+ {"setdrv", required_argument, 0, 's' }, > {0, no_argument, 0, 0} > }; > >@@ -65,9 +66,11 @@ > int param = 0; > int driver = 0; > int nosetup = 0; >+ int setdrv = 0; >+ unsigned char drv_name[51]; > const char *cmdline; > >- while ((c = getopt_long (argc, argv, "cpdnh", longopts, 0)) != -1) >+ while ((c = getopt_long (argc, argv, "cpdnhs:", longopts, 0)) != -1) > switch (c) { > case 'c': > config = 1; >@@ -83,6 +86,11 @@ > break; > case 'h': > usage (stdout, EXIT_SUCCESS); >+ break; >+ case 's': >+ strncpy(drv_name,optarg,50); >+ setdrv=1; >+ break; > default: > usage (stderr, EXIT_FAILURE); > } >@@ -101,7 +109,6 @@ > XF86ConfigPtr conf; > if (!(conf = xf86readConfigFile ())) > error (1, errno, "%s: unable to parse config file", filename); >- xf86closeConfigFile (); > > const char *drivername = > conf->conf_layout_lst->lay_adjacency_lst->adj_screen->scrn_device->dev_driver; >@@ -114,6 +121,10 @@ > if (nosetup == 0) { > char *path; > >+ if ( setdrv == 1) { >+ conf->conf_layout_lst->lay_adjacency_lst->adj_screen->scrn_device->dev_driver=strdup(drv_name); >+ xf86writeConfigFile ( filename, conf ); >+ } > if (asprintf (&path, "%s/%s", DRVDIR, drivername) < 0) > error (1, errno, "asprintf"); > execl (path, drivername, param ? filename : NULL, NULL); >@@ -123,6 +134,7 @@ > execl (path, "x11", NULL); > }; > >+ xf86closeConfigFile (); > /* error (1, errno, "execl: %s", path); */ > return 1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8574
:
1268