lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Jan 2007 14:36:14 +0000
From:	Pavel Machek <pavel@....cz>
To:	Alexey Dobriyan <adobriyan@...il.com>
Cc:	akpm@...l.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org
Subject: Re: [PATCH] seq_file conversion: APM on mips

Hi!

> @@ -456,14 +456,26 @@ static int apm_get_info(char *buf, char 
>  	case 1: 	units = "sec";	break;
>  	}
>  
> -	ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
> +	seq_printf(m, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
>  		     driver_version, APM_32_BIT_SUPPORT,
>  		     info.ac_line_status, info.battery_status,
>  		     info.battery_flag, info.battery_life,
>  		     info.time, units);
> +	return 0;
> +}
>  
> - 	return ret;
> +static int proc_apm_open(struct inode *inode, struct file *file)
> +{
> +	return single_open(file, proc_apm_show, NULL);
>  }
> +
> +static const struct file_operations proc_apm_fops = {
> +	.owner		= THIS_MODULE,
> +	.open		= proc_apm_open,
> +	.read		= seq_read,
> +	.llseek		= seq_lseek,
> +	.release	= single_release,
> +};
>  #endif
>  
>  static int kapmd(void *arg)

Perhaps now is good time to make the code shared?

							Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ