udev_node.c revision aa8734ffcb8a895fc8d66ff383cbcf8f4b78f562
2362N/A * Copyright (C) 2004-2008 Kay Sievers <kay.sievers@vrfy.org> 0N/A * This program is free software: you can redistribute it and/or modify 0N/A * it under the terms of the GNU General Public License as published by 0N/A * the Free Software Foundation, either version 2 of the License, or 2362N/A * (at your option) any later version. 2362N/A * This program is distributed in the hope that it will be useful, 0N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 0N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0N/A * GNU General Public License for more details. 0N/A * You should have received a copy of the GNU General Public License 0N/A/* reverse mapping from the device file name to the devpath */ 0N/A /* directory with device name */ 0N/A /* entry with the devpath */ 0N/A /* use relative link */ 0N/A /* preserve link with correct target, do not replace node of other device */ 0N/A info(
udev,
"replace device node '%s' with symlink to our node '%s'\n",
0N/A "link to '%s' will not overwrite it\n",
0N/A info(
udev,
"preserve already existing symlink '%s' to '%s'\n",
0N/A /* if we don't have a reference, delete it */ 0N/A /* find the device with the highest priority */ 0N/A /* did we find ourself? we win, if we have the same priority */ 0N/A info(
udev,
"compare (our own) priority of '%s' %i >= %i\n",
0N/A info(
udev,
"'%s' is our device node, database inconsistent, skip link update\n",
0N/A /* another device, read priority from database */ 0N/A info(
udev,
"'%s' is a device node of '%s', skip link update\n",
0N/A /* create symlink to the target with the highest priority */ 0N/A /* update possible left-over symlinks */ 0N/A /* link does no longer belong to this device */ 0N/A info(
udev,
"update old symlink '%s' no longer belonging to '%s'\n",
0N/A * if the node name has changed, delete the node, 0N/A * and possibly restore a symlink of another device 0N/A info(
udev,
"creating device node '%s', devnum=%d:%d, mode=%#o, uid=%d, gid=%d\n",
0N/A /* create all_partitions if requested */ 0N/A /* add node and to name index */ 0N/A /* remove node from name index */ 0N/A /* remove,update symlinks, remove symlinks from name index */