mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
makedevs: Avoid unnecessary timestamp calculation
(From OE-Core rev: af4b5eac7acf36444de078c294c3adc3f2763511) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
c8bfe84eef
commit
ba319bbffa
@@ -116,7 +116,6 @@ static void add_new_device(char *name, char *path, unsigned long uid,
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
time_t timestamp = time(NULL);
|
|
||||||
|
|
||||||
memset(&sb, 0, sizeof(struct stat));
|
memset(&sb, 0, sizeof(struct stat));
|
||||||
status = lstat(path, &sb);
|
status = lstat(path, &sb);
|
||||||
@@ -127,7 +126,6 @@ static void add_new_device(char *name, char *path, unsigned long uid,
|
|||||||
* better match the actual file or strange things will happen.... */
|
* better match the actual file or strange things will happen.... */
|
||||||
if ((mode & S_IFMT) != (sb.st_mode & S_IFMT))
|
if ((mode & S_IFMT) != (sb.st_mode & S_IFMT))
|
||||||
error_msg_and_die("%s: file type does not match specified type!", path);
|
error_msg_and_die("%s: file type does not match specified type!", path);
|
||||||
timestamp = sb.st_mtime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mknod(path, mode, rdev);
|
mknod(path, mode, rdev);
|
||||||
|
|||||||
Reference in New Issue
Block a user