[illumos-Developer] Bug #1031

Garrett D'Amore garrett at nexenta.com
Tue May 17 14:04:18 PDT 2011


Modulo a minor cstyle nit, the fix below looks about right.  (The fix for style is that you have an extra whitespace between "strtok" and the "(" that starts its argument list.)

Have you tested?

  -- Garrett D'Amore

On May 17, 2011, at 1:59 PM, "Γιώργος Γεωργίου" <paogeorge13 at gmail.com> wrote:

> Hello to all developers!
> This is my first touch with an open source project. 
> 
> I have a suggestion for solving this problem.
> 
> 
> fuction: int do_save_controls(int argc, char **argv)
> file: /illumos-gate/usr/src/cmd/audio/audioctl/audioctl.c
> 
> 
> 
> Replace lines 
>  1059 	if (strlen(d->card.hw_info)) {
>    1060 		(void) fprintf(fp, "# HW Info = %s", d->card.hw_info);
>    1061 	}
>    1062 	(void) fprintf(fp, "#\n");
> 
> 
> 
> with lines below
> 
> 
> char *hwInfo;
> 
> if (strlen(d->card.hw_info)) {
>           hwInfo = strtok (d->card.hw_info, "\n");
>           while (hwInfo != NULL) {          
>                     (void) fprintf(fp, "# HW Info = %s\n", hwInfo);
>                     hwInfo = strtok(NULL, "\n");
>           }
> }
> (void) fprintf(fp, "#\n");
> 
>                                          
>                     
> 
> 
> 
> _______________________________________________
> Developer mailing list
> Developer at lists.illumos.org
> http://lists.illumos.org/m/listinfo/developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.illumos.org/pipermail/developer/attachments/20110517/69456955/attachment.html>


More information about the Developer mailing list