<commit_before>Honour $TMPDIR for the qemu-smb temporary directory.

diff -rc -x '*~' qemu-kvm-0.12.2-orig/net/slirp.c qemu-kvm-0.12.2/net/slirp.c
*** qemu-kvm-0.12.2-orig/net/slirp.c	2010-01-18 19:48:25.000000000 +0100
--- qemu-kvm-0.12.2/net/slirp.c	2010-02-01 15:56:43.000000000 +0100
***************
*** 480,486 ****
      char smb_cmdline[128];
      FILE *f;
  
!     snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
               (long)getpid(), instance++);
      if (mkdir(s->smb_dir, 0700) < 0) {
          qemu_error("could not create samba server dir '%s'\n", s->smb_dir);
--- 480,489 ----
      char smb_cmdline[128];
      FILE *f;
  
!     char *tmpdir = getenv("TMPDIR");<commit_msg>* qemu-kvm: increase the size of the buffer used to build the smbd   command line.<commit_after>Honour $TMPDIR for the qemu-smb temporary directory.

diff -rc -x '*~' qemu-kvm-0.12.2-orig/net/slirp.c qemu-kvm-0.12.2/net/slirp.c
*** qemu-kvm-0.12.2-orig/net/slirp.c	2010-02-01 19:05:24.000000000 +0100
--- qemu-kvm-0.12.2/net/slirp.c	2010-02-01 19:05:54.000000000 +0100
***************
*** 476,486 ****
                       struct in_addr vserver_addr)
  {
      static int instance;
!     char smb_conf[128];
!     char smb_cmdline[128];
      FILE *f;
  
!     snprintf(s->smb_dir, sizeof(s->smb_dir), "/tmp/qemu-smb.%ld-%d",
               (long)getpid(), instance++);
      if (mkdir(s->smb_dir, 0700) < 0) {
          qemu_error("could not create samba server dir '%s'\n", s->smb_dir);
--- 476,489 ----
                       struct in_addr vserver_addr)
  {
      static int instance;
!     char smb_conf[1024];
!     char smb_cmdline[1024];
      FILE *f;
  
!     char *tmpdir = getenv("TMPDIR");
{'fraction_non_alphanumeric': 0.19639744334689135, 'fraction_numerical': 0.11272515979081929, 'mean_word_length': 2.5071283095723014, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3947620', 'n_tokens_mistral': 842, 'n_tokens_neox': 707, 'n_words': 129}