void		ft_display_hexdump(char *file)
{
	if (g_add == 0)
		g_total_size = 0;
	g_total_size = g_total_size + filelen(file);
	if (g_option)
	{
		g_n = 8;
		read_display(file, &hex_print_c);
	}
	else
	{
		g_n = 7;
		read_display(file, &hex_print);
	}
}
Example #2
0
/*
 * Now, *this* one could be more user-friendly, but so far, no-one has
 * complained. The significance of bits is the same as in store_disp()
 */
static ssize_t show_disp(struct device *dev,
			 struct device_attribute *attr, char *buf)
{
	struct asus_laptop *asus = dev_get_drvdata(dev);

	if (!display_get_handle)
		return -ENODEV;
	return sprintf(buf, "%d\n", read_display(asus));
}