chiark / gitweb /
convert to libudev and delete udev_utils_string.c
[elogind.git] / udev / udevadm-trigger.c
index fc871ccdcb8290a71b258d732829bfc8caadb8e0..6d01040e01cbf7ddd552bfaae08adb7856f0ffde 100644 (file)
@@ -1,20 +1,19 @@
 /*
- * Copyright (C) 2004-2006 Kay Sievers <kay@vrfy.org>
+ * Copyright (C) 2004-2008 Kay Sievers <kay@vrfy.org>
  * Copyright (C) 2006 Hannes Reinecke <hare@suse.de>
  *
- *     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.
- * 
- *     This program is distributed in the hope that it will be useful, but
- *     WITHOUT ANY WARRANTY; without even the implied warranty of
- *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *     General Public License for more details.
- * 
- *     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.,
- *     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 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, either version 2 of the License, or
+ * (at your option) any later version.
  *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <stdlib.h>
@@ -180,7 +179,7 @@ static int pass_to_socket(struct udev *udev, const char *devpath, const char *ac
                strlcat(path, name_loop->name, sizeof(path));
                strlcat(path, " ", sizeof(path));
        }
-       remove_trailing_chars(path, ' ');
+       util_remove_trailing_chars(path, ' ');
        if (path[0] != '\0') {
                bufpos += snprintf(&buf[bufpos], sizeof(buf)-1, "DEVLINKS=%s", path);
                bufpos++;
@@ -317,7 +316,7 @@ static int attr_match(const char *path, const char *attr_value)
                if (size < 0)
                        return 0;
                value[size] = '\0';
-               remove_trailing_chars(value, '\n');
+               util_remove_trailing_chars(value, '\n');
 
                /* match if attribute value matches */
                if (fnmatch(match_value, value, 0) == 0)
@@ -554,7 +553,7 @@ static void scan_failed(struct udev *udev)
                        if(start >= sizeof(device))
                                start = sizeof(device) - 1;
                        strlcat(device, dent->d_name, sizeof(device));
-                       path_decode(&device[start]);
+                       util_path_decode(&device[start]);
                        device_list_insert(udev, device);
                }
                closedir(dir);