Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2017 18:06:22 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r315995 - stable/11/contrib/dma
Message-ID:  <201703261806.v2QI6MBs005230@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Mar 26 18:06:22 2017
New Revision: 315995
URL: https://svnweb.freebsd.org/changeset/base/315995

Log:
  MFC r314520:
  
  Import dma snapshot from git 2017-02-10
  
  The only change is:
  use basename to select executable identity
  
  PR:		216910
  Submitted by:	Andrej Ebert <andrej@ebert.su>

Modified:
  stable/11/contrib/dma/dma.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/dma/dma.c
==============================================================================
--- stable/11/contrib/dma/dma.c	Sun Mar 26 18:04:05 2017	(r315994)
+++ stable/11/contrib/dma/dma.c	Sun Mar 26 18:06:22 2017	(r315995)
@@ -47,6 +47,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <libgen.h>
 #include <paths.h>
 #include <pwd.h>
 #include <signal.h>
@@ -457,7 +458,7 @@ main(int argc, char **argv)
 	bzero(&queue, sizeof(queue));
 	LIST_INIT(&queue.queue);
 
-	if (strcmp(argv[0], "mailq") == 0) {
+	if (strcmp(basename(argv[0]), "mailq") == 0) {
 		argv++; argc--;
 		showq = 1;
 		if (argc != 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703261806.v2QI6MBs005230>