Lines Matching refs:count

135 	    const char *buf, size_t count)  in state_store()  argument
146 count = rc; in state_store()
166 count = -EINVAL; in state_store()
168 return count; in state_store()
203 const char *buf, size_t count) in cmdline_store() argument
213 mdev->cmdline = kmalloc(count + 1, GFP_KERNEL); in cmdline_store()
215 count = -ENOMEM; in cmdline_store()
219 strncpy(mdev->cmdline, buf, count); in cmdline_store()
221 if (mdev->cmdline[count - 1] == '\n') in cmdline_store()
222 mdev->cmdline[count - 1] = '\0'; in cmdline_store()
224 mdev->cmdline[count] = '\0'; in cmdline_store()
227 return count; in cmdline_store()
249 const char *buf, size_t count) in firmware_store() argument
259 mdev->firmware = kmalloc(count + 1, GFP_KERNEL); in firmware_store()
261 count = -ENOMEM; in firmware_store()
264 strncpy(mdev->firmware, buf, count); in firmware_store()
266 if (mdev->firmware[count - 1] == '\n') in firmware_store()
267 mdev->firmware[count - 1] = '\0'; in firmware_store()
269 mdev->firmware[count] = '\0'; in firmware_store()
272 return count; in firmware_store()
294 const char *buf, size_t count) in ramdisk_store() argument
304 mdev->ramdisk = kmalloc(count + 1, GFP_KERNEL); in ramdisk_store()
306 count = -ENOMEM; in ramdisk_store()
310 strncpy(mdev->ramdisk, buf, count); in ramdisk_store()
312 if (mdev->ramdisk[count - 1] == '\n') in ramdisk_store()
313 mdev->ramdisk[count - 1] = '\0'; in ramdisk_store()
315 mdev->ramdisk[count] = '\0'; in ramdisk_store()
318 return count; in ramdisk_store()
340 const char *buf, size_t count) in bootmode_store() argument
353 mdev->bootmode = kmalloc(count + 1, GFP_KERNEL); in bootmode_store()
355 count = -ENOMEM; in bootmode_store()
359 strncpy(mdev->bootmode, buf, count); in bootmode_store()
361 if (mdev->bootmode[count - 1] == '\n') in bootmode_store()
362 mdev->bootmode[count - 1] = '\0'; in bootmode_store()
364 mdev->bootmode[count] = '\0'; in bootmode_store()
367 return count; in bootmode_store()
385 const char *buf, size_t count) in log_buf_addr_store() argument
399 ret = count; in log_buf_addr_store()
419 const char *buf, size_t count) in log_buf_len_store() argument
433 ret = count; in log_buf_len_store()