chiark / gitweb /
libudev: get rid of udev_sysfs.c
[elogind.git] / udev / udevadm-info.c
index b54b61e084eff27c962474805adf8922879f4ac3..1d18f812951722a3c0c6bdded2da4441b01237ff 100644 (file)
@@ -1,19 +1,18 @@
 /*
- * Copyright (C) 2004-2006 Kay Sievers <kay.sievers@vrfy.org>
+ * Copyright (C) 2004-2008 Kay Sievers <kay.sievers@vrfy.org>
  *
- *     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 "config.h"
@@ -75,10 +74,6 @@ static void print_all_attributes(struct udev *udev, const char *devpath, const c
                                len = sizeof(value) - 1;
                        dbg(udev, "attr '%s'='%s'(%zi)\n", dent->d_name, value, len);
 
-                       /* remove trailing newlines */
-                       while (len && value[len-1] == '\n')
-                               value[--len] = '\0';
-
                        /* skip nonprintable attributes */
                        while (len && isprint(value[len-1]))
                                len--;