*
* Copyright 2005 Red Hat, Inc.
*
- * This software may be freely redistributed under the terms of the GNU
- * public license.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 of the License.
*/
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
-#include "../../udev_utils.h"
-#include "../../logging.h"
+#include "../../udev.h"
#define FIRMWARE_PATH "/lib/firmware"
#define PATH_SIZE 256
count = 0;
while (count < fw_buffer_size) {
- int c;
+ ssize_t c;
- c = write(fw_fd, fw_buffer+count, fw_buffer_size);
+ c = write(fw_fd, fw_buffer+count, fw_buffer_size-count);
if (c <= 0) {
rc = errno;
close(fw_fd);