chiark / gitweb /
udevadm: info - use "udev_device"
[elogind.git] / udev / lib / libudev-ctrl.c
index b2af0c73edd996e0f86d9ee1b07b084392893801..e42f631571712ce5652738727b4452cb2608d71e 100644 (file)
@@ -1,19 +1,20 @@
 /*
- * Copyright (C) 2005-2008 Kay Sievers <kay.sievers@vrfy.org>
+ * libudev - interface to udev device information
  *
- *     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.
+ * Copyright (C) 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, 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"
@@ -28,7 +29,6 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#include "../udev.h"
 #include "libudev.h"
 #include "libudev-private.h"
 
@@ -154,7 +154,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int
        ctrl_msg.type = type;
 
        if (buf != NULL)
-               strlcpy(ctrl_msg.buf, buf, sizeof(ctrl_msg.buf));
+               util_strlcpy(ctrl_msg.buf, buf, sizeof(ctrl_msg.buf));
        else
                ctrl_msg.intval = intval;
 
@@ -201,12 +201,6 @@ int udev_ctrl_send_set_max_childs(struct udev_ctrl *uctrl, int count)
        return 0;
 }
 
-int udev_ctrl_send_set_max_childs_running(struct udev_ctrl *uctrl, int count)
-{
-       ctrl_send(uctrl, UDEV_CTRL_SET_MAX_CHILDS_RUNNING, count, NULL);
-       return 0;
-}
-
 struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl *uctrl)
 {
        struct udev_ctrl_msg *uctrl_msg;
@@ -323,10 +317,3 @@ int udev_ctrl_get_set_max_childs(struct udev_ctrl_msg *ctrl_msg)
                return ctrl_msg->ctrl_msg.intval;
        return -1;
 }
-
-int udev_ctrl_get_set_max_childs_running(struct udev_ctrl_msg *ctrl_msg)
-{
-       if (ctrl_msg->ctrl_msg.type == UDEV_CTRL_SET_MAX_CHILDS_RUNNING)
-               return ctrl_msg->ctrl_msg.intval;
-       return -1;
-}