X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Ffirmware%2Ffirmware_helper.c;h=ca1c43814f754a21709a93f6cedbd6eef264c491;hp=7b7a307298384ccdb16e8d10f48cb404d7dae482;hb=5005ca5991edb233d3a6bb41ba7d48d5f8a296ab;hpb=440103fcfc99626c4705f879b63ad710de0209de diff --git a/extras/firmware/firmware_helper.c b/extras/firmware/firmware_helper.c index 7b7a30729..ca1c43814 100644 --- a/extras/firmware/firmware_helper.c +++ b/extras/firmware/firmware_helper.c @@ -3,13 +3,9 @@ * * 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 @@ -21,8 +17,7 @@ #include #include -#include "../../udev_utils.h" -#include "../../logging.h" +#include "../../udev.h" #define FIRMWARE_PATH "/lib/firmware" #define PATH_SIZE 256 @@ -118,9 +113,9 @@ int main(int argc, char **argv) { 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);